From: Alexey K. <akh...@us...> - 2008-05-29 18:42:19
|
Update of /cvsroot/aaf/AAF/test/com/ComModTestAAF/ModuleTests In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv22098/test/com/ComModTestAAF/ModuleTests Modified Files: CAAFEssenceDescriptorTest.cpp Log Message: Simplify the object reference cleanup code in CreateAAFFile() - retrieving interfaces of strongly referenced objects and releasing them does not remove the objects. Index: CAAFEssenceDescriptorTest.cpp =================================================================== RCS file: /cvsroot/aaf/AAF/test/com/ComModTestAAF/ModuleTests/CAAFEssenceDescriptorTest.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** CAAFEssenceDescriptorTest.cpp 26 Feb 2008 05:41:09 -0000 1.48 --- CAAFEssenceDescriptorTest.cpp 29 May 2008 18:42:25 -0000 1.49 *************** *** 828,854 **** // Cleanup object references ! if ( edesc ) { ! edesc->CountLocators(&numLocators); ! ! for (i=0; i<numLocators; ++i) ! { ! edesc->GetLocatorAt(i, &pLocator); ! pLocator->Release(); ! } ! ! edesc->Release(); ! } ! ! if (edesc2) { ! edesc2->CountSubDescriptors(&numSubDescriptors); ! for (i=0; i<numSubDescriptors; ++i) ! { ! edesc2->GetSubDescriptorAt(i, &pSubDescriptor); ! pSubDescriptor->Release(); ! } ! ! edesc2->Release(); ! } if (pMob) --- 828,836 ---- // Cleanup object references ! if (edesc) ! edesc->Release(); ! if (edesc2) ! edesc2->Release(); if (pMob) *************** *** 859,863 **** if (pDictionary) ! pDictionary->Release(); if (pHeader) --- 841,845 ---- if (pDictionary) ! pDictionary->Release(); if (pHeader) |