|
@@ -68,7 +68,6 @@ static YH_DeviceInfoMonitor *yh_globalDeviceInfoMonitor = nil; |
|
@@ -68,7 +68,6 @@ static YH_DeviceInfoMonitor *yh_globalDeviceInfoMonitor = nil; |
68
|
|
68
|
|
69
|
- (void)dealloc {
|
69
|
- (void)dealloc {
|
70
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil];
|
70
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:nil];
|
71
|
- [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillEnterForegroundNotification object:nil];
|
|
|
72
|
}
|
71
|
}
|
73
|
|
72
|
|
74
|
#pragma mark - utilites
|
73
|
#pragma mark - utilites
|
|
@@ -123,4 +122,16 @@ static YH_DeviceInfoMonitor *yh_globalDeviceInfoMonitor = nil; |
|
@@ -123,4 +122,16 @@ static YH_DeviceInfoMonitor *yh_globalDeviceInfoMonitor = nil; |
123
|
return vm_page_size * (vmStats.free_count + vmStats.inactive_count);
|
122
|
return vm_page_size * (vmStats.free_count + vmStats.inactive_count);
|
124
|
}
|
123
|
}
|
125
|
|
124
|
|
|
|
125
|
++ (NSUInteger)appUsedMemory {
|
|
|
126
|
+ return [yh_globalDeviceInfoMonitor appUsedMemory];
|
|
|
127
|
+}
|
|
|
128
|
+
|
|
|
129
|
++ (NSUInteger)allUsedMemory {
|
|
|
130
|
+ return [yh_globalDeviceInfoMonitor allUsedMemory];
|
|
|
131
|
+}
|
|
|
132
|
+
|
|
|
133
|
++ (NSUInteger)availableMemory {
|
|
|
134
|
+ return [yh_globalDeviceInfoMonitor availableMemory];
|
|
|
135
|
+}
|
|
|
136
|
+
|
126
|
@end |
137
|
@end |