What are the semantics of [myThing.myProperty release]?
- by dugla
I clearly have not fully grocked properties. I have an instance of a class, myThing. myThing has a property that has be synthesized:
// .h
@property(nonatomic,retain)MyCoolType *coolType;
// .m
@synthesize coolType;
In my program I call:
// The retain count on MyCoolType is 1.
[myThing.coolType release];
The reference count on MyCoolType is now zero and dealloc should fire.
So, shouldn't myThing.coolType now be nil? In my code that is not the case. How do a correctly release and force the property to return nil?
Thanks,
Doug