#include #include #include @interface Something : Object { NXConstantString *x; } -init:(NXConstantString*)str; -free; -printString; @end @implementation Something -init:(NXConstantString*)str { x = str; } -free { x = nil; return [super free]; } -printString { puts([x cString]); } @end int main(void) { id n; n = [[Something alloc] init:@"Hello Fricking World"]; [n printString]; n = [n free]; return 0; }