. testNumber , :
test.testNumber = [[NSDecimerNumber alloc] initWithInt:1];
alloc-init . , :
test.testNumber = [[[NSDecimerNumber alloc] initWithInt:1] autorelease];
, testNumber dealloc.
, , createTestInstance - Test, ( , "alloc", "new", "copy" "mutableCopy" , ):
+ (id)createTestInstance {
Test *test = [[[self alloc] init] autorelease];
test.testNumber = [[[NSDecimerNumber alloc] initWithInt:1] autorelease];
return test;
}
, @Josh Caswell, id . Objective-C :
id , .
, self alloc-init , (self , ).