In the left panel do you see any objects/classes/views and etc on the list that should not be there or should have been deallocated?.Check for these signs of a retain cycle/memory leak:.Take a look at what objects are in-memory and how much of each instance exists per object. Run through a core flow/feature and leave it, then repeat this several times and take a memory snapshot of the app.The approach to using the Memory Graph DebuggerĪ useful approach for catching memory leaks is running the app through some core flows and taking a memory snapshot for the first and subsequent iterations. In the next section, I will explain the approach to using the memory graph debugger for debugging. Please note that the Xcode’s auto-detection does not always catch every memory leak, and oftentimes you will have to find them yourself. Tapping it would show you the leaked instances on the left panel. In addition, the memory graph debugger can auto-detect simple memory leaks and prompt you warnings such as this purple ! mark. But it will not show you what references that the selected object has references to.įor example, to verify that there is no retain cycle in the objects which MainViewController has a strong reference to, you would need to look at your codebase to identify the referenced objects, and then individually select each of the object graphs to check if there is a retain cycle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |