Re: Simple low memory warning?
Re: Simple low memory warning?
- Subject: Re: Simple low memory warning?
- From: Bill <email@hidden>
- Date: Tue, 20 Apr 2010 10:36:22 -0700
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 (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