• 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: Memory Managment (copys??)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Managment (copys??)


  • Subject: Re: Memory Managment (copys??)
  • From: Coleman Nitroy <email@hidden>
  • Date: Sun, 6 Feb 2005 13:37:55 -0500


On Feb 6, 2005, at 11:16 AM, Roarke Lynch wrote:

This code will leak. You should replace the first line in the for loop with:

	object = [[[SOMEObject alloc] init] autorelease];

You need to make sure that any local objects you use are (retain, alloc, copy) / (autorelease, release) balanced.

Why is a autorelease needed? How exactly does autoreleasing work?

---
Coleman Nitroy
email@hidden
nitroy.com/cole

_______________________________________________
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: Memory Managment (copys??)
      • From: Charlton Wilbur <email@hidden>
References: 
 >Re: Memory Managment (copys??) (From: Will Mason <email@hidden>)
 >Re: Memory Managment (copys??) (From: Roarke Lynch <email@hidden>)

  • Prev by Date: Re: Memory Managment (copys??)
  • Next by Date: Re: Memory Managment (copys??)
  • Previous by thread: Re: Memory Managment (copys??)
  • Next by thread: Re: Memory Managment (copys??)
  • Index(es):
    • Date
    • Thread