On Feb 3, 2009, at 7:53 AM, Adam Venturella wrote:
Ah! so if I never call upon the accessor, it would never make a copy.
Since it made a copy(once called), it's retained, and thus would be my
responsibility for releasing it.
Thanks for the link! Didn't even think copy was the issue.
Sure. T
Ah! so if I never call upon the accessor, it would never make a copy.
Since it made a copy(once called), it's retained, and thus would be my
responsibility for releasing it.
Thanks for the link! Didn't even think copy was the issue.
On Tue, Feb 3, 2009 at 7:42 AM, Bill Bumgarner wrote:
> On Fe
On Feb 3, 2009, at 7:39 AM, Adam Venturella wrote:
return [collection copy];
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#/
/apple_ref/occ/instm/NSObject/copy
___
Cocoa-dev
I know that this is the wrong way to do it, but could someone explain
why this causes a memory leak? The crux of it is, you set an ivar to
be Mutable, and you set the property to return an immutable object.
You override the default accessor method to return a copy of the
mutable ivar.
@interface