> Also be aware that just because memory is released, doesn't mean it is 
> returned to the system (e.g. you will not
> see your apps memory usage go down in Activity Monitor). In fact,  AFAIK, it 
> is never returned to the system,
> except perhaps in low memory situations.

I don't actually think that's true.  At least, it's not what I observe.  I 
think it's more accurate to say that you cannot predict when memory which has 
been allocated and then freed will be returned to the operating system, nor how 
much.  It happens, I believe, in 4k pages, but probably not one at a time and 
will be heavily dependent on fragmentation of the process's heap.  No doubt 
there is much more to know.

I agree with the sentiment of keeping an eye on your peak memory usage.  I use 
Instruments for this, and it found one instance where memory usage was creeping 
steadily up when the app was playing audio but otherwise idle.

Paul Sanders.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to