• 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
Fwd: How far with accessors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: How far with accessors?


  • Subject: Fwd: How far with accessors?
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 26 May 2004 22:11:55 +0200

Don,

you should use accessors in your dealloc, but a different way:

On 26.5.2004, at 20:51, Don Rainwater wrote:

> In the dealloc method for theRecord, is there any reason (standards,
> performance, personal preference, etc.) to use
> [[self theString] release];
> or is
> [_theString release];
> fine/preferred?

The preferred method is

-(void)dealloc {
[self setTheString:nil];
...
}

Also, instead of the names theString/setTheString: a pair
stringValue/setStringValue: (or, at the very least and in special
circumstances, string/setString:) would be *much* better.
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: How far with accessors?
      • From: Jeff Biggus <email@hidden>
  • Prev by Date: Re: NSOutlineView, NSBrowserCell and Images
  • Next by Date: Re: How far with accessors?
  • Previous by thread: Re: How far with accessors?
  • Next by thread: Re: How far with accessors?
  • Index(es):
    • Date
    • Thread