Memory management question in Objective-C 2.0 @property notation
Memory management question in Objective-C 2.0 @property notation
- Subject: Memory management question in Objective-C 2.0 @property notation
- From: Devraj Mukherjee <email@hidden>
- Date: Thu, 5 Feb 2009 15:54:49 +1100
Hi all,
I have a few classes that form the domain logic of my application and
comprise of objects of NSNumber, NSDate, NSString. I initialize these
with new objects in the init message of each of these classes.
These properties are defined using the @property (nonatomic, retain)
and @synthesize directives.
When I create objects of these Classes and replace these other values
(objects), my app seems to leak memory (according to Instruments)
specially when working with NSDates. Is there a trick that I should be
looking for when using @property and @synthesize or should I actually
be writing my own setters and getters to handle these properly.
Thanks.
--
"The secret impresses no-one, the trick you use it for is everything"
- Alfred Borden (The Prestiege)
_______________________________________________
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