6 @implementation TestRoot (Loader)
9 [[TestRoot new] autorelease];
10 testassert(TestRootAutorelease == 1);
11 testassert(TestRootDealloc == 0);
17 // +load's autoreleased object should have deallocated
18 testassert(TestRootDealloc == 1);
20 [[TestRoot new] autorelease];
21 testassert(TestRootAutorelease == 2);
23 objc_autoreleasePoolPop(objc_autoreleasePoolPush());
25 [[TestRoot new] autorelease];
26 testassert(TestRootAutorelease == 3);
29 [[TestRoot new] autorelease];
30 testassert(TestRootAutorelease == 4);
31 testassert(TestRootDealloc == 1);
34 // thread's autoreleased object should have deallocated
35 testassert(TestRootDealloc == 2);