From: John T. <nu...@me...> - 2011-12-17 13:54:17
|
On Sat, Dec 17, 2011 at 10:43:26AM +0000, Martin Payne wrote: > > The crash in the Windows atexit callback happens because the freeglut > deinitialize function is making calls to functions in modules which have > been unloaded. When the deinitialize atexit callback is executed on > Windows, we can only guarantee that kernel32.dll is loaded, so we can't > attempt any kind of video cleanup without the risk of causing a crash. So where is the proper place to do cleanup on windows? The whole point of atexit is that it can be used to register cleanup functions to be called *before* the process is torn down and destroyed. If on windows atexit callbacks are called after parts of the address space are removed then I think that's a pretty big libc bug. Bug or no bug, we must work around the limitations of the implementation, but I'm just curious. -- John Tsiombikas http://nuclear.mutantstargoat.com/ |