[vlc-devel] [PATCH] Python bindings memory management fixes

Jan David Mol jjdmol at gmail.com
Tue May 29 12:53:23 CEST 2007


Hi,

I fixed some bugs in the Python bindings i came across. The patch is  
attached, hopefully it can be of use. It fixes the following issues:

- The use of PyObject_DEL instead of PyMem_DEL, since objects are  
allocated using PyObject_New.
- Fixed a memory leak in vlcInstance_new in case of illegal parameters
- MediaControl.getInstance() returns a vlcInstance, an object  
wrapping its p_instance. If the vlcInstance was deallocated, so was  
the p_instance of the MediaControl. The MC now keeps a vlcInstance at  
all times, and just hands out references to it. This fixes crashes  
when MediaControl.getInstance() is used but when that reference is  
not kept around.

Greetings,
   Jan David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pythonbinding.patch
Type: application/octet-stream
Size: 4557 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070529/3b3981db/attachment.obj>


More information about the vlc-devel mailing list