iphone - Memory still increasing when use CFRelease for ABRecordCopyValue? -


i have problem make headache, create method:

-(void) main{        (int = 0; i< 100;i++) {            [self getphoneofcontact:i];       }  }  -(void)getphoneofcontact:(nsinteger)id_contact {       abrecordref record = abaddressbookgetpersonwithrecordid(addressbook,id_contact);       cftyperef ref1;      ref1 = abrecordcopyvalue(record,kabpersonphoneproperty);       cfrelease(record);      cfrelease(ref1);  } 

i think memory approximate constants because have release memory copied, in reality still increasing each loop i; can explain me :(. thanks!

your code wrong. abaddressbookgetpersonwithrecordid call follows core foundation 'get rule'. means not have ownership of return value , not have release it.

see core foundation - memory management


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -