• 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: Preventing beach balls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preventing beach balls


  • Subject: Re: Preventing beach balls
  • From: Paul Borokhov <email@hidden>
  • Date: Sat, 3 Mar 2007 11:18:19 -0800

Yes, every method has NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; at the beginning and [pool release]; at the end. If they didn't, I'd be leaking a lot more than NSLocks.
Paul

----------Original Message----------
  On 3/3/07 12:13 , PGM (email@hidden) wrote:
>
> On 3-Mar-07, at 3:06 AM, Paul Borokhov wrote:
>
>> So...now that threads have been implemented...
>> It appears that NSLock is leaking memory. My application performs
>> regular updates and retrieves data every 6 seconds from the web.
>> Each update is done by a separate method and each method is detached
>> from the main thread when the timer fires. Now, NSLock uses
>> continuously more memory as the application runs, according to
>> ObjectAlloc. This is also happening to a lesser extent with CFBag,
>> CFRunLoopSource, and NSRecursiveLock. I'm not using any of these in
>> my code directly so I'm a bit curious as to why they are using
>> memory, and more and more of it with each minute.
>> Any ideas?
>> Paul
>
> Did you implement an NSAutoreleasePool for your threads? Otherwise
> any object that will be sent an autorelease method will simply leak
> memory.
>
> Good luck, Patrick
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
    • Re: Preventing beach balls
      • From: Bill Bumgarner <email@hidden>
References: 
 >Re: Preventing beach balls (From: Paul Borokhov <email@hidden>)
 >Re: Preventing beach balls (From: PGM <email@hidden>)

  • Prev by Date: Re: Subclass of NSMutableDictionary hanging
  • Next by Date: [ANN] AMButtonBar
  • Previous by thread: Re: Preventing beach balls
  • Next by thread: Re: Preventing beach balls
  • Index(es):
    • Date
    • Thread