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

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -