Re: Memory Management for an Array
Re: Memory Management for an Array
- Subject: Re: Memory Management for an Array
- From: David Duncan <email@hidden>
- Date: Mon, 13 Jun 2011 09:05:43 -0700
On Jun 13, 2011, at 7:31 AM, Bing Li wrote:
> I think the memory management in my system is much better. I just used
> Instruments to check potential leaks. To my surprise, I was still notified
> that the following method got memory-leaking although the amount was small.
> Could you please tell me how to fix this problem? Maybe I just ignore it?
Leaks does not (and in fact cannot) tell you why something leaked, it can only tell you where the object that leaked was originally created. If it is pointing you at this method, it is because something created in this method was leaked. It is up to you to then follow the lifetime of that object to discover why it was leaked.
The method at hand looks good, so it is most likely that the caller or one of its callers has failed to correctly manage the memory.
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden