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

Popular posts from this blog

SAP Web Service from .NET via WCF -

email - PHP Mail Error "The Page at X Says: E-Mail can not be sent!" -

Optimized Line drawing in QT -