0
릴리스 이후에 클래스 객체가 여전히 존재하는 이유는 누구든지 설명 할 수 있습니까? 여기릴리스 이후에 존재하는 객체
#import <Foundation/Foundation.h>
#import "MyClass.h"
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
MyClass *class = [[MyClass alloc] init];
NSLog(@"%@", [class showMouse]);
NSLog(@"%@", [class printKbd]);
[class release];
NSLog(@"%@", [class printKbd]);
//still exist
[pool drain];
return 0;
}
'release' 객체를 호출하면 더 이상 필요 없다는 것을 알 수 있습니다. 나중에 언젠가는 풀려날거야. – Nekto