• 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: In-loop releasing of objects does not free memory?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: In-loop releasing of objects does not free memory?


  • Subject: Re: In-loop releasing of objects does not free memory?
  • From: Keith Duncan <email@hidden>
  • Date: Fri, 15 Feb 2008 20:07:48 +0000

I hadn't considered the effect that changing the method would have on shipping apps - I was simply concerned that the function of the method doesn't match it's implied function IMHO.

for (i = 0; i < 1000; i++) {
  NSAutoreleasePool *pool = [NSAutoreleasePool new];
  // do some work
 [pool drain];
}

I like this way of doing things. I don't use -new anywhere else in my code but using it for NSAutoreleasePool in a GC app would highlight that the pool is a *special* case. This is the pattern I'll be using, thanks for that!


Keith
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • [Foo new] vs [[Foo alloc] init]: was Re: In-loop releasing of objects does not free memory?
      • From: Adam P Jenkins <email@hidden>
References: 
 >In-loop releasing of objects does not free memory? (From: Arthur C. <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: John Terranova <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: John Stiles <email@hidden>)
 >RE: In-loop releasing of objects does not free memory? (From: Arthur C. <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Randall Meadows <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Uli Kusterer <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Nick Zitzmann <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Randall Meadows <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Michael Watson <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Keith Duncan <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Jim Correia <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Adam P Jenkins <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Jim Correia <email@hidden>)
 >Re: In-loop releasing of objects does not free memory? (From: Adam P Jenkins <email@hidden>)

  • Prev by Date: Re: Archives
  • Next by Date: Re: r/w resource forks
  • Previous by thread: Re: In-loop releasing of objects does not free memory?
  • Next by thread: [Foo new] vs [[Foo alloc] init]: was Re: In-loop releasing of objects does not free memory?
  • Index(es):
    • Date
    • Thread