...
|
...
|
@@ -68,7 +68,6 @@ static YH_DeviceInfoMonitor *yh_globalDeviceInfoMonitor = nil; |
|
|
|
|
|
- (void)dealloc {
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil];
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil];
|
|
|
}
|
|
|
|
|
|
#pragma mark - utilites
|
...
|
...
|
@@ -123,4 +122,16 @@ static YH_DeviceInfoMonitor *yh_globalDeviceInfoMonitor = nil; |
|
|
return vm_page_size * (vmStats.free_count + vmStats.inactive_count);
|
|
|
}
|
|
|
|
|
|
+ (NSUInteger)appUsedMemory {
|
|
|
return [yh_globalDeviceInfoMonitor appUsedMemory];
|
|
|
}
|
|
|
|
|
|
+ (NSUInteger)allUsedMemory {
|
|
|
return [yh_globalDeviceInfoMonitor allUsedMemory];
|
|
|
}
|
|
|
|
|
|
+ (NSUInteger)availableMemory {
|
|
|
return [yh_globalDeviceInfoMonitor availableMemory];
|
|
|
}
|
|
|
|
|
|
@end |
...
|
...
|
|