On Dec 26, 2008, at 8:29 AM, Steve Wetzel wrote:
-(void)setNumerator:(NSInteger)n {
[numerator release];
numerator = [NSNumber numberWithInteger:n];
+numberWithInteger creates an autoreleased object. You are also releasing numerator explicitly in your -dealloc method, so when you release the pool, numerator will get released a second time. Either retain numerator or use alloc/init.
[pool release];
You should generally use [pool drain] instead of release. It doesn't matter here, but if you get in the habit of using -drain instead of - release, then when it does matter, you will already be covered.
-- Dave Carrigan [email protected] Seattle, WA, USA
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ 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]
