简体   繁体   中英

how to solve iPhone app memory leak in xcode(instruments)

Now i'm developing iPhone app but it seems happen memory leak. I found by Instruments:

在此处输入图片说明

I have question:

-- how to find where is code that happen memory leak about "Malloc xx bytes"?

-- I think I can't improve memory leak in Library. Example for "Foundation", "StoreKit" and so on, right?

Switch to the call tree view to find the areas of your code allocating the leaked memory. For more detailed information, see my answer to the following question:

Unable to track memory issue

Also for clearer representation of memory leaks select Allocation tool, go to File>Recording Options and tick "Discard events for freed memory".

In this way all the spikes that you will see in the chart will be actual unfreed memory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM