iphone - Analyzing message ios app -


i analyze app , getting message :

value stored in object during intialization never used.

here code:

{         dataarray=[[nsmutablearray alloc]init];         dataarray=root[@"data"];         nsmutabledictionary *object=[[nsmutabledictionary alloc]init]; //here getting message         searchedname=[[nsmutablearray alloc]init];         for(int i=0;i<[dataarray count];i++)        {             object=[dataarray objectatindex:i];             [searchedname addobject:object[@"charityname"]];         }     } 

i don't know trying say. can 1 me?

it's trying never use [[nsmutabledictionary alloc]init] value initialise object variable with. first make object point new empty dictionary, created [[nsmutabledictionary alloc]init] make point every object in dataarray

actually don't need these 2 lines:

dataarray=[[nsmutablearray alloc]init]; 

and:

nsmutabledictionary *object=[[nsmutabledictionary alloc]init]; 

the second 1 should nsmutabledictionary *object = nil; instead


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -