On Apr 20, 2010, at 10:34 AM, Jean-Daniel Dupas wrote:

> 
> Le 20 avr. 2010 à 19:23, Bill a écrit :
> 
>> 
>> On Apr 20, 2010, at 10:17 AM, Nick Zitzmann 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?
>>> 
>> 
>> No, haven't filed anything yet.  Thought I'd wait to see if anything like 
>> that existed first.
>> 
>> My app has several tasks that collect data via a loop and display it on a 
>> table.  Objects are retained as they're displayed so the objects don't have 
>> to be recalculated next time they're displayed.  But if I received a 
>> low-memory warning, I could release that data, and recalculate it later if 
>> needed.  Seems simple enough, but I don't know how to find out when memory 
>> is low.
>> 
> 
> And what make NSCache and NSDiscardableContent not appropriate here ? 

They are not inappropriate, but they require a lot more work than a simple 
warning sent via a notification or other means.

-Bill

_______________________________________________

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