Thanks for the bug. We should be cleaning everything up when a QCRenderer is released and that is unfortunately a under-utilized path since most people exit the process when the QCRenderer is finished and don't notice leaks. This is a bug, so thank you.
Remember that QC can be run in garbage collection, so your dealloc method would do nothing. As Chris says, the correct place to put this is in stopExecution. Troy On Oct 22, 2009, at 12:47 PM, Christopher Wright wrote: >> That means you can't programatically release the hardware nor any other >> objects or buffers allocated when the plugin is initialized. > > While I completely agree that -dealloc isn't reliably called (or at all, > under most circumstances), and that that's a bug, there is still a way to > programatically clean up: > > - (void) stopExecution:(id<QCPlugInContext>)context; > > Under the Discussion section of the documentation for this method, you'll > find the following: > > "Discussion > The Quartz Composer engine calls this method when it stops executing. You can > optionally override this execution method to perform cleanup tasks." > > (from > http://developer.apple.com/mac/library/documentation/Cocoa/Reference/QCPlugIn_Class/Introduction/Introduction.html#//apple_ref/occ/instm/QCPlugIn/stopExecution: > ) > > It's not dealloc, and it's definitely not following the standard Cocoa > conventions for cleanup, and their own examples certainly don't reveal this > quirk at all, but I've found that -stopExecution: is effectively equivalent > to -dealloc (in terms of cleaning up object-managed resources), and it is > reliably called. > > Further, outside of the QC editor, -dealloc /is/ reliably called when a > QCComposition is released. So it's just the editor that has retain/release > issues, not the underlying QC framework itself. (so other apps that use QC > aren't going to run into problems). > > -- > > [ christopher wright ] > [email protected] > http://kineme.net/ > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Quartzcomposer-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/quartzcomposer-dev/tkoelling%40apple.com > > This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

