#import #import #import #import #import #import @interface Dummy : Object { id objOne; struct stat statBuf; BOOL flagOne; } + alloc; - init; @end @implementation Dummy : Object + alloc { return class_createInstance(self, 0); } - init { printf("Instance has SELF at %lx\n", (unsigned long)self); printf("Instance variable objOne at %lx\n", (unsigned long)&objOne); printf("Instance variable statBuf at %lx\n", (unsigned long)&statBuf); printf("Instance variable flagOne at %lx\n", (unsigned long)&flagOne); printf("sizeof(struct stat) is %lu\n", sizeof(struct stat)); return self; } @end int main(int argc, char *argv[]) { [[Dummy alloc] init]; return 0; }