__strong depolama eleme Bu durum için gereklidir: Aşağıdaki komut belirir satırında
Automatic Reference Counting Issue: Passing address of non-local object to __autoreleasing parameter for write-back
: Aşağıdaki hatayı alıyorsunuz
+ (NSString *)personPropertyNameForIndex:(kSHLPersonDetailsTableRowIndex)index
{
static NSArray *propertyNames = nil;
(nil == propertyNames) ?
[self SHL_initPersonPropertyNamesWithArray:&propertyNames] : NULL;
}
+ (void)SHL_initPersonPropertyNamesWithArray:(NSArray **)theArray
{
*theArray = [[NSArray alloc]
initWithObjects:@"name", @"email", @"birthdate", @"phone", nil];
}
.
+ (void)SHL_initPersonPropertyNamesWithArray:(NSArray * __strong *)theArray
Ancak bu kod Basic Memory Management Rules takip etmez.
You own any object you create
You create an object using a method whose name begins with “alloc”, “new”, “copy”, or “mutableCopy” (for example, alloc, newObject, or mutableCopy).
Bunun için ne yapmak istersiniz?
Bu [https://stackoverflow.com/questions/8814718/handling-pointer-to-pointer-ownership-issues-in-arc?answertab=active#tab-top] adresini de kontrol edin; Şüpheler – tharinduNA