iphone - Potential leak Analyzer result wont go away -


i have method, , analyzer tells me there potential leak of itemsarray mutable array. have added corresponding release @ end of method, still analyzer result remains.

- (void)addcategory:(nsstring*)category {     nsmutablearray *itemsarray = [[nsmutablearray alloc] initwithcapacity:1];      if (category) {         [[app_delegate itemsdictionary] setobject:itemsarray forkey:category];       }      [self dismissmodalviewcontrolleranimated:yes];     [itemsarray release]; } 

how can fix it?

thanks.

this code not raise issues analyzer:

static nsmutabledictionary *itemsdictionary;  - (void)addcategory:(nsstring*)category {     nsmutablearray *itemsarray = [[nsmutablearray alloc] initwithcapacity:1];      if (category) {         [itemsdictionary setobject:itemsarray forkey:category];       }      [self dismissmodalviewcontrolleranimated:yes];     [itemsarray release]; } 

can post exact wording (or perhaps screenshot) of warning see?


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -