How is the leak?

So, I got to the damn part of my application development, where I look at the check for memory leaks. I decided to give Xcode Leaks a whirlwind. When I first launched it, he told me that I have no memory leaks. After a moment of joy, I carefully looked, looked through the distribution and realized that I had several objects in my memory that I did not need there. For example, every time I created a UIAlertView (which was quite common in my application), I never release them when they were fired from the view. This caused several UIAlertView objects to appear around.

So my question is: how do leaks detect a memory leak? Why didn't I say that there were some leaks when I had UIAlertView objects that floated around? Am I just misusing leaks?

+4
source share
1 answer

If you still have pointers to these instances of UIAlertView , they are not technically a leak yet. Only when your application can no longer reach them is it considered a Leaks tool leak. As you noticed, there really are ways to still be around that you expect them to be gone. That the Allocations tool comes in handy.

+3
source

All Articles