In objective-c, using ARC, when do BOOL (or int) properties get deleted?
For example, suppose I have
@property (nonatomic) BOOL happy; //Suppose this is a property of class Face
In this case when does the happy property get deleted? I ask this because there is no specifier such as strong or weak. In fact, Xcode will not even let you declare this property as strong or weak?
My guess is that it has something to do with BOOLs being stored on the stack and regular, object properties being stored in the heap, but this is just a guess.
Thanks
if the
BOOLis part of your class, it gets deleted when the class gets released by the autorelease pool. Otherwise, any primitives on the stack goes away when the variable goes out of scope. There’s no need to memory manage primitive types, unless you explicitly have pointers to them.