• 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 not being released in a timely manner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory not being released in a timely manner


  • Subject: Re: Memory not being released in a timely manner
  • From: Jonathan Taylor <email@hidden>
  • Date: Thu, 06 Jun 2013 12:41:56 +0100

Thankyou all for your replies. A few responses -

On 4 Jun 2013, at 16:30, Jeff Johnson wrote:
> We've run into this issue in a number of apps. As a workaround, we add a timer to the main thread and have it fire periodically. The timer's action method does the following:

Thanks again! I've implemented your code and that has "fixed" my problem - great news.


On 4 Jun 2013, at 18:33, Jens Alfke wrote:
> I don’t know if ObjectAlloc is supported anymore; you should be using Instruments.
>
> It’s been a long time since I used that app, so I don’t know if it reports all heap allocations or just Obj-C objects. The problem is that a small object (like an NSImageRep) can be hanging onto huge memory buffers for pixels.

Apologies, I meant the Allocations tool within Instruments. [Incidentally, in my install ObjectAlloc just launches Instruments/Allocations]

As far as I can see, the Allocations tool does not report memory that is pending release from an autorelease pool. It would be interesting to know if there was a way of monitoring that. Re your suggestion about wrapping code with my own autorelease pools, I have done so but I am pretty sure the movie generation APIs that I am using launch their own threads, ones that I don't have control over. Without being able to see exactly what allocations are still pending release, I can't be sure, but I am as certain as I can be that that's where the memory-pending-autorelease must be accumulating.

>> The problem seems to be that, even though ObjectAlloc thinks the memory has been released, it is not actually being properly freed up until some time later. The memory usage as reported in Activity Monitor climbs higher and higher until, if left unattended, there is apparently no more memory available.
>
> There are a lot of different numbers measuring different kinds of memory usage, and not all of them are relevant to this. What specific value in Activity Monitor are you talking about? The most relevant one is Private Mem (RPRVT).

Yep, that's the one. (I was trying to keep my original email reasonably concise!)


Cheers
Jonny.
_______________________________________________

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:
    • Re: Memory not being released in a timely manner
      • From: Greg Parker <email@hidden>
References: 
 >Memory not being released in a timely manner (From: Jonathan Taylor <email@hidden>)
 >Re: Memory not being released in a timely manner (From: Jeff Johnson <email@hidden>)
 >Re: Memory not being released in a timely manner (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: how to draw a elliptical pie chart?
  • Next by Date: Re: using SUBQUERY to remove nulls
  • Previous by thread: Re: Memory not being released in a timely manner
  • Next by thread: Re: Memory not being released in a timely manner
  • Index(es):
    • Date
    • Thread