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++ and pd?
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.
Rich
On Sun, Nov 29, 2009 at 3:05 AM, Mathieu Bouchard matju@artengine.cawrote:
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