DidReceiveMemoryWarning advice (too many multitasking applications in the background)?

Please help, I do not know what I should do with didReceiveMemoryWarning. My application started well, but when there are too many running background applications, it gets a memory warning and exits. I just want to show a warning that asks the user to exit some background applications.

I have appDelegate, in its window there is a view of my viewController, it has another selected view (composite) with two subviews (XIB above the OpenGL view), and this is set as CameraOverlayView in viewController.

I tried to release all the material in one at the warning, but still came out. Should I implement didReceiveMemoryWarning in every view? Can I somehow โ€œforceโ€ initialize the process?

+3
source share
1 answer

If your application terminates during its active operation, you probably have a memory leak, which is why your application consumes a large amount of memory.

When the OS runs out of memory, it will stop performing background tasks, starting with the most intensive memory, and then eventually in the very first application. The user never needs to manually stop background applications to save memory. All this is done automatically.

, . , , , .

didReceiveMemoryWarning , , , . , , viewDidUnload. IBOutlet nil.

, , , "" "", , , .

+2

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


All Articles