On Mon, Sep 14, 2009 at 9:42 AM, jon <[email protected]> wrote:
> - (void)setTypeOfLeaf:(NSNumber*)flag
> {
> if (!typeOfLeaf || ![typeOfLeaf isEqual:flag])
> {
> [typeOfLeaf release];
> typeOfLeaf = [flag retain];
> }
> }
This is how how you should be implementing this setter. In
particular, the !typeOfLeaf condition shouldn't be there.
- (void)setTypeOfLeaf:(NSNumber *)flag {
[flag retain];
[typeOfLeaf release];
typeOfLeaf = flag;
}
Also, we need to see your -typeOfLeaf method.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]