NSString *fullpath = [[NSBundle mainBundle] pathForResource:@"text_file" ofType:@"txt"];
爲什麼下面的消息出現在哪裏? 我的代碼是否泄漏?
2010-03-31 13:44:18.649 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x3909ba0 of class NSPathStore2 autoreleased with no pool in place - just leaking
Stack: (0x1656bf 0xc80d0 0xcf2ad 0xcee0e 0xd3327 0x2482 0x2426)
2010-03-31 13:44:18.653 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x390b0b0 of class NSPathStore2 autoreleased with no pool in place - just leaking
Stack: (0x1656bf 0xc80d0 0xc7159 0xd0c6f 0xd3421 0x2482 0x2426)
2010-03-31 13:44:18.672 MJIPhone[2175:207] *** _NSAutoreleaseNoPool(): Object 0x390d140 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x1656bf 0xc6e62 0xcec1b 0xd4386 0x24ac 0x2426)
它說你沒有一個自動釋放池運行在代碼執行的時候;在你沒有設置內存管理的線程中是否有這一行? – 2010-03-31 16:57:36
我剛剛在主函數中添加了該代碼。 – okami 2010-03-31 17:14:24