• 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 allocation questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory allocation questions


  • Subject: Re: Memory allocation questions
  • From: Nathan Day <email@hidden>
  • Date: Tue, 30 Jul 2002 23:50:12 +0930

The point is if you just release instead of autorelease it could fail, though you could of cause also just retain the newSprocket before you release the mainSprocket.

On Friday, January 2, 1970, at 09:48 PM, Roarke Lynch wrote:

Even if mainSprocket and newSprocket are the same object, this could should not cause problems. By autoreleaseing, not releasing, mainSprocket, it might not get dealloc'd, An object does not get dealloc'd until it's reference count is zero. If they are the same object, at the end of the eventLoop, it's ref count will remain the the same as before this method was called.

Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
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.

  • Prev by Date: Writing an object as an NSData
  • Next by Date: Re: What's the best way saving a string into PDF?
  • Previous by thread: Re: More memory allocation questions
  • Next by thread: Re: Memory allocation questions
  • Index(es):
    • Date
    • Thread