Thank you for the tip. Unfortunately atexit() calls too late; having a "finalize" callback from node would be helpful in my case. I need to wait for worker threads to be finished, however doing this is more complex as soon as the DLL is in the process of exiting (reference: http://msdn.microsoft.com/en-us/windows/hardware/gg487379 p.6)
Thank you, Jerome Couture-Gagnon Fabric Engine On Apr 20, 10:43 am, Ben Noordhuis <i...@bnoordhuis.nl> wrote: > 2012/4/20 Jérôme Couture-Gagnon <jerome.couture-gag...@fabric-engine.com>: > > > Hi, > > > For C++ modules, there is an init() callback in which a module can do > > initialization work. Is there some symmetric exit / cleanup / finalize > > callback? Or is there another proper way of releasing resources just > > before a module unloads? > > > Note: this is for a Windows specific problem, but I guess that my > > question applies for all platforms.. > > There is nothing like a destroy() hook but you can register a cleanup > function with atexit(). -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en