Will the -dealloc method be called when the application is closed?

Apple says Cocoa -dealloc will not be called when the application exits. Does this also apply to the iPhone?

+3
source share
2 answers

Yes Yes. If the application leaves, under certain circumstances dealloc will not be called. If, for example, something in the WillTerminate application takes too much time or throws an uncaught exception, the application will stop working without calling dealloc.

, never dealloc , . dealloc , .

, , , , , .

+3

applicationWillTerminate ( [ ]), dealloc

+3

Source: https://habr.com/ru/post/1707187/


All Articles