On Mar 27, 2010, at 5:39 PM, Michael Davey wrote:

> On 27 Mar 2010, at 22:16, Quincey Morris wrote:
> 
>> On Mar 27, 2010, at 14:11, Klaus Backert wrote:
>> 
>>> something like this (caution: typed in mail, etc.)
>> 
>> 
>> Yeah, something like this, but *not* this:
>> 
>>>     self.myFields = [[NSMutableArray alloc] init];
>> 
>> That's a memory leak right there. :)
>> 
>> Incidentally, I think the OP was mistakenly interpreting Instruments as 
>> indicating the point of the leak. Instruments was indicating the place where 
>> the leaked object was originally created, which is likely *not* the point of 
>> the error. (In fact, there usually isn't a point where the leak occurs -- it 
>> occurs because some necessary 'release' was omitted.)
> 
> So, how do I go about finding this place?

As Quincey said, there may not be any place, since it could be an *omission* of 
a release. However, if you are not using a setter, and you are properly 
releasing the ivar in dealloc, chances are there is a second assignment to 
"myFields" somewhere in your code that is invalidating a previous one. Are you 
perhaps setting it to nil at some point but not releasing it?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to