I have the following block that gives me problems in the performance tool: in particular, it says that STObject is leaking. I'm not sure why?
for (NSDictionary *message in messages) { STObject *mySTObject = [[STObject alloc] init]; mySTObject.stID = [message valueForKey:@"id"]; [items addObject:mySTObject]; [mySTObject release]; mySTObject = nil; } [receivedData release]; receivedData=nil; [conn release]; conn=nil;
UPDATE:
is this a property of @property (non-atomic, conservation), will this result in a hold value of +2?
- NSArray NSDictionary, , mySTObject , , , - , nil. , , "" .
/, STObject? , STObject "- (void) dealloc" ). , STObject , , STObject, .
dealloc :
- (void)dealloc { [stID release]; [myVar2 release]; [myVar3 release]; [super dealloc]; }
, [super dealloc] .
10.6, Xcode " ", , .
mySTObject ...
[mySTObject release]; mySTObject = nil;
just delete mySTObject = nil;I think it should be ..
mySTObject = nil;
Source: https://habr.com/ru/post/1760292/More articles:C # SerialPort.ReadExisting Error - c #Find the "peak" of the data set - normal-distributionIs it possible to change the color of the MPMediaPickerController navigation bar? - iphoneKeyDown event does not fire for 'enter' in AutoCompleteBox - eventsCustom ribbon button in SharePoint 2010 appears disabled - sharepoint-2010What is this 405 method not allowed svn error? - svnHow to get value from tag ? - htmlIs it possible to generate a unique machine hash in C # - c #Is it possible to use multiple @Qualifier annotations in Spring? - javaView taxonomy with nodes - viewsAll Articles