///**************************
// MyClass.m
#import "MyClass.h"
static MyClass *myClass = NULL;
@implementation MyClass
myClass = [[MyClass alloc] init];
return myClass;
}
@end
Hi Experts, I just want to know myClass is a static ObjC object, it will be automatically released by ARC when no one is referencing it anymore, so no memory leak? is it correct?
// MyClass.m
#import "MyClass.h"
static MyClass *myClass = NULL;
@implementation MyClass
(MyClass *)sharedMyClass {
myClass = [[MyClass alloc] init];
return myClass;
}
@end
Hi Experts, I just want to know myClass is a static ObjC object, it will be automatically released by ARC when no one is referencing it anymore, so no memory leak? is it correct?