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

Re: Memory Question


  • Subject: Re: Memory Question
  • From: Andreas Mayer <email@hidden>
  • Date: Mon, 11 Nov 2002 04:33:25 +0100

Am Montag, 11.11.02 um 04:02 Uhr schrieb Azarhi:

So my question is this, am I going about this the wrong way and creating a memory leak or is the object that is that slot autoreleased when I put a new copy in?

If you are replacing a object inside a container like NSMutableArray or NSMutableDictionary, the old object is released by the container object.

This is nothing special. The container retains the object, so it has to release it if it's done with it.

Your responsibilty is to release the object after putting it in the container (if you don't need it any more, of course).


bye. Andreas.
_______________________________________________
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: Memory Question
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: NSTimer & NSInternalInconsistencyException
  • Next by Date: Re: Memory Question
  • Previous by thread: Re: Save tiff with no alpha
  • Next by thread: Re: Memory Question
  • Index(es):
    • Date
    • Thread