Re: Simple low memory warning?
Re: Simple low memory warning?
- Subject: Re: Simple low memory warning?
- From: Laurent Cerveau <email@hidden>
- Date: Tue, 20 Apr 2010 19:22:12 +0200
One possibility is to install a CFRunLoopObserverRef that would query for available memory, using task_info on mach_task_self().
Then you can check if you start to are coming nearer to "dangerous territories". Not perfect though as usually the moment you can not alloc some memory it can be already too late
laurent
On Tuesday, April 20, 2010, at 07:17PM, "Nick Zitzmann" <email@hidden> wrote:
>
>On Apr 20, 2010, at 10:10 AM, Bill wrote:
>
>> Does there exist a low-memory warning for Mac apps similar to the didReceiveMemoryWarning for the iPhone? I have looked at NSCache and other related classes, but for my purposes it would be better to simply receive a low memory warning and then act on the warning. Does such a warning exist for the Mac?
>
>Unfortunately no, but that would be a good idea, especially in 32-bit apps. Have you filed an enhancement request?
>
>Nick Zitzmann
><http://www.chronosnet.com/>
>
>_______________________________________________
>
>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
>
>
_______________________________________________
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