• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Memory management question in Objective-C 2.0 @property notation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Memory management question in Objective-C 2.0 @property notation
      • From: Kiel Gillard <email@hidden>
  • Prev by Date: Re: nsarraycontroller "auto rearrange content"
  • Next by Date: Re: Confused about NSTrackingAreas with autoscroll
  • Previous by thread: Re: Saving application data in ~/Library/Application Support/
  • Next by thread: Re: Memory management question in Objective-C 2.0 @property notation
  • Index(es):
    • Date
    • Thread