Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Very Weird Memory Leak With ARC

Good afternoon,

I was doing some Instruments testing on my iOS app that I'm about to release, but I noticed some VERY strange memory leaks, that appear to be coming from System libraries.

When I ran Instruments I got this leak: enter image description here

Which is extremely weird from my point of view! I went to the Call Tree of these leaks and they all appear to be deep C++ system calls.

enter image description here

What confuses me even more is that this project has ARC enabled, and I ran it through the Analyzer and no problems showed up. Even more weird is that this DOES NOT happen on the Simulator, nor on my real iPad, but on my iPhone this problem happens.

And when I check "Show Obj-C only" and "Hide System Libraries" the call trace disappears which leads me to believe my code is not responsible for the leak.

Why is this happening and what can I do to fix it?

Thanks guys.

like image 689
Alejandro Avatar asked Jan 03 '13 18:01

Alejandro


1 Answers

The above leak is not a leak inside your app and it is inside apple's library which you dont have to worry about. If you have fixed all the leaks inside your app, you are fine. Apple will not reject your app just because of this small leak.

like image 160
iDev Avatar answered Oct 04 '22 06:10

iDev