Why Instruments report a leak?
Posted
by mike
on Stack Overflow
See other posts from Stack Overflow
or by mike
Published on 2010-06-11T19:51:02Z
Indexed on
2010/06/11
19:52 UTC
Read the original article
Hit count: 242
iphone
Hi,
I am developing an iphone app. Instruments reported a leaked object ServiceTypes. Below is the relevant code. Does anyone have any ideas? Thanks a lot for your help.
ServiceTypes *serviceTypes = [[ServiceTypes alloc] init];
if ([userConnection getServiceTypes:serviceTypes]) { if ([serviceTypes.types length] > 0) { NSArray *array = [[NSArray alloc] initWithArray:[serviceTypes.types componentsSeparatedByString: SERVICE_TYPE_DELIMITOR]]; serviceRequestTypes = [[NSMutableArray alloc] initWithArray:array]; [array release]; } }
[[self typesTableView] reloadData]; [serviceTypes release];
© Stack Overflow or respective owner