• 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 Management, A Working Example of My Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Management, A Working Example of My Question


  • Subject: Re: Memory Management, A Working Example of My Question
  • From: Greg Herlihy <email@hidden>
  • Date: Fri, 30 Dec 2005 20:42:21 -0500

It's not clear why this code needs an NSAutoreleasePool at all. Its use
appears to be almost entirely superfluous.

As long as a "part" is a member of an NSMutableArray (such as the goodParts
array or the replacementParts array) it will remain allocated. Once a part
is removed from every NSMutableArray that contains it, it becomes eligible
for deallocation and the runtime will reclaim its memory at some point. The
program need not be concerned with that detail.

Greg


On 12/30/05 7:43 PM, "Jordan Evans" <email@hidden> wrote:

> Okay, I made a simple example that works. This I hope
> will make it easier to understand my question.
>
> Notice how in maintenance I release the pool, then
> start it up again, so I could get around the dilemma I
> described in my original question. My question: is
> there a better way,
> simpler way?



_______________________________________________
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

References: 
 >RE: Memory Management, A Working Example of My Question (From: Jordan Evans <email@hidden>)

  • Prev by Date: Re: getting info of an image
  • Next by Date: Re: Agent Applications and launchd
  • Previous by thread: RE: Memory Management, A Working Example of My Question
  • Next by thread: RE: Memory Management, A Working Example of My Question
  • Index(es):
    • Date
    • Thread