-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRFPerformance.h
More file actions
39 lines (30 loc) · 795 Bytes
/
RFPerformance.h
File metadata and controls
39 lines (30 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*!
RFPerformance
RFKit
Copyright (c) 2012-2013, 2015-2016, 2018 BB9z
https://github.com/BB9z/RFKit
The MIT License (MIT)
http://www.opensource.org/licenses/mit-license.php
*/
#import "RFRuntime.h"
#ifndef RFAlloctionLog
# define RFAlloctionLog \
+ (id)alloc {\
id var = [super alloc];\
NSLog(@"%@ alloc >> %p", [self class], (__bridge void *)var);\
return var;\
}\
- (void)dealloc {\
NSLog(@"%@ dealloc << %p", [self class], (__bridge void *)self);\
}
#endif
#ifndef _RFAlloctionLog
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-id-macro"
# define _RFAlloctionLog
#pragma clang diagnostic pop
#endif
@interface RFPerformance : NSObject
/// Print menory usage details
+ (void)logMemoryInfo;
@end