• 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
Re: Re: Memory management question (passing objects to method)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Memory management question (passing objects to method)


  • Subject: Re: Re: Memory management question (passing objects to method)
  • From: Conor Dearden <email@hidden>
  • Date: Wed, 02 Mar 2005 00:48:33 +0100

Also if you release something and not immediately assign it a value, make
sure to assign it an intrim value of nil.  This is so that other release
messages that might be called, don't try to release a non exciting object.
Clean programming, avoids hassles.

-(void)doSomething:(NSString *)aVar;
{
    [localInstanceOfVar autorelease];
    localInstanceOfVar = nil;
}


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Re: Memory management question (passing objects to method)
      • From: Justin Spahr-Summers <email@hidden>
  • Prev by Date: Example code for inspector with disclosure views
  • Next by Date: Re: Solved: Changing initial value of isDocumentEdited
  • Previous by thread: Re: Re: Memory management question (passing objects to method)
  • Next by thread: Re: Re: Memory management question (passing objects to method)
  • Index(es):
    • Date
    • Thread