MyOpenGLView dealloc not call
i downloaded example from http://developer.apple.com/mac/library/samplecode/GLFullScreen/Listings/MyOpenGLView_h.html
in files My开发者_开发百科OpenGLView.m and MainController.m is method - (void) dealloc
but when program terminated newer call this method.
I put there my code when program terminated but it isn't executed. How to make that method dealloc will called, or how to make other method that will call when program terminated?
Thanks in advance Chudziutki
If you're looking specifically for a way to execute code right before the application is terminated, override your NSApplicationDelegate
's applicationShouldTerminate:
or applicationWillTerminate:
methods.
精彩评论