This is the scenario:
suppose we have a MyObject class, and we declare a property by @property (strong) NSObject *aObj in “MyObject.h”; then we use this property in “MyObject.m”.
A. self.aObj = [[NSObject alloc] init];
B. aObj = [[NSObject alloc] init];
I wonder whether there are memory leaks with A. it seems in MRC if the strong is retain, A will case memory leaks. if in ARC, this still cause memory leaks?
No, under ARC, neither causes a memory leak. ARC is smart enough to handle these cases.