Subj : atexit and forms cleanup To : borland.public.cpp.borlandcpp,borland.public.cppbuilder.language.cpp From : "Bartlomiej Knapp" Date : Mon Apr 12 2004 05:47 pm Hi, I'm trying to implement a Singleton pattern with Borland Builder tools. My implementation relies on a atexit() function to do cleanup of objects. I would like this function to be executed lastly, right before it exits to the OS. Unfortunately, it seems that Builder registers its own handler for cleaning up the forms right before I can issue atexit, therefore exiting last (LIFO). Is there any way to control the order, or workaround that? Thanks Bartek .