[gst-devel] python-gst and garbage collection of pipeline elements

Antoine Pitrou antoine.pitrou at wengo.fr
Mon Nov 27 12:48:27 CET 2006


> I cannot reproduce the problem in the way you describe.  Can you provide
> a (preferably small) example program that triggers the problem?

Well, thanks for asking that.
I've tried to reproduce it and it actually boils down to : if I call
gc.collect() only once, not everything is collected, but if I call it
twice or more, it's ok. 
I didn't expect this because my code does not create any obvious loop
containing the weakref'd attribute, so I thought refcounting would
finalize it at soon as possible.

The clean solution I've found is to remove that attribute in the
do_stop() method of the containing element, which automatically
finalizes it without having to call gc.collect().

So, sorry for the false alert.



More information about the gstreamer-devel mailing list