0
儀器 - 泄漏用於剖析myApp。結果如下:修復main.m中的泄漏
泄漏
# Address Category Event Type RefCt Timestamp Size Responsible Library Responsible Caller
0 0xe8b8120 Malloc 48 Bytes Malloc 1 00:30.130.300 48 myApp main
堆棧跟蹤
0 libsystem_c.dylib 0x36fa9be3
1 libsystem_c.dylib 0x36fae57c
2 libnotify.dylib 0x364fe126
3 libnotify.dylib 0x364ff392
4 libnotify.dylib 0x364ff4fc
5 CoreFoundation 0x35276af4
6 CoreFoundation 0x35278066
7 UIKit 0x324448d4
8 UIKit 0x32426648
9 UIKit 0x324432d4
10 UIKit 0x324207ba
11 UIKit 0x323b0f0c
12 UIKit 0x325e1564
13 UIKit 0x3232d0fc
14 UIKit 0x3232bc4a
15 UIKit 0x32338990
16 UIKit 0x323387ce
17 UIKit 0x3233839c
18 UIKit 0x3231e83c
19 UIKit 0x3231e0e2
20 GraphicsServices 0x3655322a
21 CoreFoundation 0x352d4522
22 CoreFoundation 0x352d44c4
23 CoreFoundation 0x352d3312
24 CoreFoundation 0x352564a4
25 CoreFoundation 0x3525636c
26 GraphicsServices 0x36552438
27 UIKit 0x3234ce7c
28 myApp main /Developer/+Projects/myApp/myApp/main.m:16
29 myApp start
其實我不知道如何解決從main.m.泄漏我怎樣才能解決這個問題?提前致謝!
編輯1
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
//line 16
}
}
Thx爲您的答覆。但我沒有在我的IOS5.1 –
中使用ARC,很高興幫助!啊,我的錯誤,編輯我的答案,因爲這是所有iOS 5的影響。我沒有意識到@autoreleasepool可用於所有項目,而不僅僅是ARC。 – andycam
現在已經很清楚了。謝謝:) –