Memory Leak, No Way!

Today I encountered the following debugger output when I ran my iPad application code:

2011-07-18 23:09:50.205 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b0fc60 of class __NSArrayM autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.207 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b10960 of class NSCFString autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.209 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b11bd0 of class NSCFString autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.211 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b11f60 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.211 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b12170 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.212 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b12380 of class __NSArrayI autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.212 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b124d0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.213 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b125e0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.214 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b12cf0 of class UIDeviceRGBColor autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.214 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b13010 of class __NSArrayM autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.215 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b0f960 of class __NSArrayM autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.216 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b12f80 of class NSCFString autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.216 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b13130 of class NSCFString autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.217 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b13030 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.217 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b132d0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.218 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b131b0 of class __NSArrayI autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.219 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b131c0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.219 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b134f0 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.220 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b133d0 of class NSCFString autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.221 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b13680 of class NSPathStore2 autoreleased with no pool in place - just leaking
2011-07-18 23:09:50.222 Whiteboard[55591:207] *** __NSAutoreleaseNoPool(): Object 0x4b13640 of class NSConcreteData autoreleased with no pool in place - just leaking

This is quite confusing, because for each background thread, I created its own NSAutoreleasePool, and of cource the main thread's NSAutoreleasePool is just out there in main.m, so what's the problem ? I use Instruments's leak detecting tool, it shows when the application bootstrap, it calls my singleton class ActionManager's load method which I used to load the data as a class helper method ([ActionManager load]). I suddenly realize that the problem is here !

Since each NSObject defines a load method as the cocoa documentation says: "Invoked whenever a class or category is added to the Objective-C runtime; implement this method to perform class-specific behavior upon loading". When the app runs, it call every needed class' load method. The ActionManager's load method is mistakenly override by me, that's why the debugger output these messages (Hmm, it even crashes my iPad sometimes). 

悼袁兄

    6月28日6时许,接到电话说袁兄落入西湖还未捞起,初以为此乃毕业季的一个玩笑,不料赶到现场后,才知这是沉痛的事实。现场救援人员经过2小时的打捞,才将他打捞上岸,无奈溺水时间过久,不治身亡。

    尤记得前日夜晚,还与他、钱兄和老班长同吃了顿烧烤,畅谈人生理想,共叙离别情怀。不料如今确阴阳相隔,人世之无常,非世人所可以控制。悲伤间隙,特作诗一首,愿袁兄在天堂安息。

 

悼袁兄
昔日清风细雨夜,
把酒愁言叙离别。
今朝铄石流金日,
踌躇志葬芙蓉池。
孤山园外泪纵横,
西泠桥畔空叹息。
愿君此去携明月,
共赏荷塘笑忘时。