設計單例的目的,限制這個類只能創(chuàng)建一個對象
避免重復開辟空間,節(jié)約內存
+ (instancetype)shareSandBoxStore {
static sandCaseStore *sand = nil;
if (sand == nil) {
sand = [[sandCaseStore alloc] init]
}
return sand;
}
設計單例的目的,限制這個類只能創(chuàng)建一個對象
避免重復開辟空間,節(jié)約內存
+ (instancetype)shareSandBoxStore {
static sandCaseStore *sand = nil;
if (sand == nil) {
sand = [[sandCaseStore alloc] init]
}
return sand;
}