[PD] question about external free functions
reakinator at gmail.com
Tue Dec 1 22:28:35 CET 2009
Okay, so Ctrl-Q skips all free functions on purpose. If I am understanding
correctly, I need to register my cleanup function with atexit on a function
of type void _function_(void), but that means I don't have access to any of
my object's member variables.
In the case of flext, the external class would need to be declared as static
in order for its destructor to be called before shutting down - do you know
if this is right, or possible, Thomas or anyone else knowing about flext/C++
The reason I need this is because I am messing around with disconnecting the
wacom events from controlling the tablet, which takes some calls that change
the driver's settings. If I cannot turn the settings back before the
program stops, they are permanently screwed until I restart the
driver/computer. At least, this is all I can tell so far.
On Sun, Nov 29, 2009 at 3:05 AM, Mathieu Bouchard <matju at artengine.ca>wrote:
> On Sat, 28 Nov 2009, Rich E wrote:
> Can anyone help me understand why an external's free function doesn't seem
>> to be called if pd is shut down as a whole (ex. ctrl-q)? I put post's,
>> printf's, and breakpoints in my free function and they are called if I
>> remove the external from the patch or the patch as a whole (ex. ctrl-w).
>> But, if I shut down pd all at once, the breakpoint doesn't trigger and I
>> don't get any print. The same thing happens in a flext external, within the
>> ~Destructor method. I don't understand.
> because the exit() function always skips over all destructions except those
> mandated by atexit().
> _ _ __ ___ _____ ________ _____________ _____________________ ...
> | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list