• 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: Simple low memory warning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Simple low memory warning? (From: Bill <email@hidden>)
 >Re: Simple low memory warning? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Simple low memory warning?
  • Next by Date: Re: CoreData: updating property of fetched object and refetching
  • Previous by thread: Re: Simple low memory warning?
  • Next by thread: Re: Simple low memory warning?
  • Index(es):
    • Date
    • Thread