osx - Should i release objects that i get from dictionary on Mac? -
ie:
boolref = (cfbooleanref)cfdictionarygetvalue(descriptiondictionary, kdadiskdescriptionmediaremovablekey); if (boolref) { cfrelease(boolref); // need code? }
first read memory management programming guide core foundation. answer no, because of create rule. cfdictionarygetvalue()
not include words "create" or "copy."
note cfrelease()
in case not unneeded, incorrect , lead over-release crash.
Comments
Post a Comment