2

I was trying to check the memory leak for my project using Instruments. Although, I could launch instruments but while its running the simulator is launching with white screen only. So that I could not debug my application to find the retain cycle. I am using Xcode Version 11.3 (11C29). Can anyone have faced such that issue. And share your thoughts to get the status of memory leak.

ssowri1
  • 1,299
  • 2
  • 14
  • 31
  • Usage of instruments is kinda outdated. See https://stackoverflow.com/questions/60149983/how-to-fix-memory-leaks-in-ios-applications/60157622#60157622 – mfaani Feb 29 '20 at 17:31
  • Although, I had got the issue with instruments while launching simulator. If it is outdated, it is still existing in Xcode. That's why I shared my query here. Great, I have found the solution with my friend's (Arun) support. And shared the same solution below as an answer. – ssowri1 Mar 02 '20 at 09:24
  • 1
    To be honest I haven’t used instruments for a long time now. I think it provides more debugging details. Additionally with the ‘Allocation’ you can identify memory growth which then you have to narrow it down yourself and figure out if it’s from a leak, abandoned memory or just cached memory. I don’t think Xcode itself gives a nice memory graph timeline. It just gives you a current level of app memory consumption. – mfaani Mar 02 '20 at 14:43

1 Answers1

3

Ultimately, We have got the solution for this question. Please follow the below steps to launch the instruments,

Run the app -> Debug Navigator -> Click CPU -> Click Profile in Instruments button in the Right window -> Then Click the Transfer button in the pop up window.

ScreenShot1

It will launch the Instruments with the selected project, Now you can check the retain cycle of your project through your application.

Great!!! You can have the INSTRUMENTS now :-)

enter image description here

Even, You can have the UI of your app to test the memory leak.

enter image description here

ssowri1
  • 1,299
  • 2
  • 14
  • 31