问题:描述memory warning的机制,并列举出APP应该做什么来防止?
答:系统有四种内存警告,定义如下:
Typedef enum {
OSMemoryNotificationLevelAny = -1,
OSMemoryNotificationLevelNormal = 0,
OSMemoryNotificationLevelWarning = 1,
OSMemoryNotificationLevelUrgent = 2,
OSMemoryNotificationLevelCritical = 3,
}OSMemoryNotificationLevel;