[xiph-commits] r8721 - in trunk/oggdsf: build/oggcodecs sln/oggdsf_all src/lib/codecs/cmml/libCMMLTagsDotNET

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Tue Jan 11 01:18:56 PST 2005


Author: illiminable
Date: 2005-01-11 01:18:55 -0800 (Tue, 11 Jan 2005)
New Revision: 8721

Modified:
   trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/DescTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/HeadTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ImportTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTagList.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.h
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.cpp
   trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.h
Log:
* Fixed the memory management of the CMML .NET wrappers around unmanaged code.

Modified: trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
===================================================================
--- trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj	2005-01-11 09:18:55 UTC (rev 8721)
@@ -45,12 +45,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_14E3067B71584FB5A245A2DA9D65D139"
-        "OwnerKey" = "8:_UNDEFINED"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_1ED42AE022EB477985E46FA18A63F9A5"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -130,108 +124,96 @@
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
+        "OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
+        "OwnerKey" = "8:_EFEA71FFF2864107815DBDECCCCA1178"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_141113E874984C0483C694B14F3C16A3"
+        "OwnerKey" = "8:_EB09F87C612C40BCA34AC87060CFEFF1"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_A0E68123D9D541DFA9691752981C903A"
+        "OwnerKey" = "8:_E6B7C1CA6BF74C998B68B4C3379FB830"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_1FDED4DADD384431A22FF1C26BE42207"
+        "OwnerKey" = "8:_E1E372FA955046E6928BF533EA0AE6C3"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
+        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_EFEA71FFF2864107815DBDECCCCA1178"
+        "OwnerKey" = "8:_D3E41A5878FC4EC0B0F443CF3E5991BA"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_EB09F87C612C40BCA34AC87060CFEFF1"
+        "OwnerKey" = "8:_D2048C8B212841C88E42F6ADDCA8B0A2"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_E6B7C1CA6BF74C998B68B4C3379FB830"
+        "OwnerKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_E1E372FA955046E6928BF533EA0AE6C3"
+        "OwnerKey" = "8:_B9749E2A902A46BEAE555C07E32980BB"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_D3E41A5878FC4EC0B0F443CF3E5991BA"
+        "OwnerKey" = "8:_AC8962A7F212481095173AB7C8C89025"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_D2048C8B212841C88E42F6ADDCA8B0A2"
+        "OwnerKey" = "8:_A0E68123D9D541DFA9691752981C903A"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
+        "OwnerKey" = "8:_9F87CF49E6BC48AE9DECD5A3F35FEC24"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_B9749E2A902A46BEAE555C07E32980BB"
+        "OwnerKey" = "8:_950B983745EC40EF9FF08E742A6E9510"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_AC8962A7F212481095173AB7C8C89025"
+        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_9F87CF49E6BC48AE9DECD5A3F35FEC24"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_950B983745EC40EF9FF08E742A6E9510"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
         "OwnerKey" = "8:_8D9A2E4C592D4118B80A4AE8394D8963"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -328,12 +310,18 @@
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_14E3067B71584FB5A245A2DA9D65D139"
+        "OwnerKey" = "8:_1FDED4DADD384431A22FF1C26BE42207"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+        "OwnerKey" = "8:_141113E874984C0483C694B14F3C16A3"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
         "OwnerKey" = "8:_0D0DD40A31F842C68B09BE0CBDE1996B"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -345,6 +333,12 @@
         }
         "Entry"
         {
+        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+        "OwnerKey" = "8:_054BE8EA6F5E45A7AB2066734E998570"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_4EB6175B98B54613A5087D8EA257D00A"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -406,36 +400,6 @@
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_141113E874984C0483C694B14F3C16A3"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_A0E68123D9D541DFA9691752981C903A"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_1FDED4DADD384431A22FF1C26BE42207"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
         "OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -472,6 +436,12 @@
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
         "OwnerKey" = "8:_DB60960DC12343B89500B86D5AB10D02"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -514,6 +484,12 @@
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_A0E68123D9D541DFA9691752981C903A"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
         "OwnerKey" = "8:_9F87CF49E6BC48AE9DECD5A3F35FEC24"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -526,6 +502,12 @@
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
         "OwnerKey" = "8:_8D9A2E4C592D4118B80A4AE8394D8963"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -634,12 +616,18 @@
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_14E3067B71584FB5A245A2DA9D65D139"
+        "OwnerKey" = "8:_1FDED4DADD384431A22FF1C26BE42207"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_141113E874984C0483C694B14F3C16A3"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
         "OwnerKey" = "8:_0D0DD40A31F842C68B09BE0CBDE1996B"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -651,6 +639,12 @@
         }
         "Entry"
         {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_054BE8EA6F5E45A7AB2066734E998570"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_81A3CDB604B64763884C387192BE6771"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -3457,37 +3451,9 @@
                 {
                 }
             }
-            "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_14E3067B71584FB5A245A2DA9D65D139"
-            {
-            "SourcePath" = "8:..\\..\\src\\lib\\codecs\\cmml\\libWinCMMLParse\\Debug\\libWinCMMLParse.dll"
-            "TargetName" = "8:"
-            "Tag" = "8:"
-            "Folder" = "8:_371AD289B6DB4693BDF7568485051F1E"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:FALSE"
-            "IsolateTo" = "8:"
-            "ProjectOutputGroupRegister" = "3:1"
-            "OutputConfiguration" = "8:"
-            "OutputGroupCanonicalName" = "8:Built"
-            "OutputProjectGuid" = "8:{23BAAF7B-AEC3-4812-AA91-7E5061E83A39}"
-            "ShowKeyOutput" = "11:TRUE"
-                "ExcludeFilters"
-                {
-                }
-            }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_1FDED4DADD384431A22FF1C26BE42207"
             {
-            "SourcePath" = "8:..\\..\\src\\lib\\codecs\\cmml\\libcmmlparse\\debug\\libCMMLParse.dll"
+            "SourcePath" = "8:..\\..\\src\\lib\\codecs\\cmml\\libCMMLParse\\Debug\\libCMMLParse.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_371AD289B6DB4693BDF7568485051F1E"

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2005-01-11 09:18:55 UTC (rev 8721)
@@ -988,7 +988,7 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfCMMLRawSource", "..\..\src\lib\codecs\cmml\dsfCMMLRawSource\dsfCMMLRawSource.vcproj", "{35D263B8-C0C4-4F28-AC6D-07F8C82A01B8}"
 	ProjectSection(ProjectDependencies) = postProject
-		{23BAAF7B-AEC3-4812-AA91-7E5061E83A39} = {23BAAF7B-AEC3-4812-AA91-7E5061E83A39}
+		{899EB7AD-26BF-4495-9BE5-EADECCC288B2} = {899EB7AD-26BF-4495-9BE5-EADECCC288B2}
 		{AD38DCC6-B431-4B32-8569-74F3376EF2DA} = {AD38DCC6-B431-4B32-8569-74F3376EF2DA}
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/CMMLPreamble.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -48,7 +48,12 @@
 	}
 
 	CMMLPreamble::~CMMLPreamble(void)
+		
 	{
+		if (mDeleteBase) {
+			delete mBaseClass;
+		}
+		mBaseClass = NULL;
 	}
 
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -55,7 +55,10 @@
 	}
 	ClipTag::~ClipTag(void)
 	{
-		delete mBaseClass;
+		if (mDeleteBase) {
+			delete mBaseClass;
+		}
+		mBaseClass = NULL;
 	}
 	
 	C_ClipTag* ClipTag::getMe() {

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/DescTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/DescTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/DescTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -48,7 +48,7 @@
 		if (mDeleteBase) {
 			delete mBaseClass;
 		}
-		mDeleteBase = NULL;
+		mBaseClass = NULL;
 	}
 
 	DescTag::DescTag(C_DescTag* inTag, bool inDeleteBase) {

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/HeadTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/HeadTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/HeadTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -64,7 +64,7 @@
 	}
 	TitleTag* HeadTag::title() {
 		//Title is gauranteed to exist.
-		return new TitleTag(getMe()->title()->clone());
+		return new TitleTag(getMe()->title(), false);
 	}
 	BaseTag* HeadTag::base() {
 		if (getMe()->base() != NULL) {

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ImportTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ImportTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ImportTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -79,7 +79,8 @@
 		return Wrappers::WStrToNetStr( getMe()->title().c_str() );
 	}
 	ParamTagList* ImportTag::paramList() {
-		return new ParamTagList(getMe()->paramList()->clone());
+		return new ParamTagList(getMe()->paramList(), false);
+		
 
 	}
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -43,12 +43,16 @@
 		mBaseClass = new C_MetaTag;
 	}
 
-	MetaTag::MetaTag(C_MetaTag* inTag) {
+	MetaTag::MetaTag(C_MetaTag* inTag, bool inDeleteBase) {
+		mDeleteBase = inDeleteBase;
 		mBaseClass = inTag;
 	}
 	MetaTag::~MetaTag(void)
 	{
-		delete mBaseClass;
+		if (mDeleteBase) {
+			delete mBaseClass;
+		}
+		mBaseClass = NULL;
 	}
 
 	C_MetaTag* MetaTag::getMe() {

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.h	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTag.h	2005-01-11 09:18:55 UTC (rev 8721)
@@ -52,7 +52,7 @@
 	{
 	public:
 		MetaTag(void);
-		MetaTag(C_MetaTag* inTag);
+		MetaTag(C_MetaTag* inTag, bool inDeleteBase);
 		virtual ~MetaTag(void);
 
 		//Accessors

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTagList.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTagList.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/MetaTagList.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -85,12 +85,12 @@
 	}
 
 	MetaTag* MetaTagList::getTag(unsigned long inTagNo) {
-		return new MetaTag(getMe()->getTag(inTagNo));
+		return new MetaTag(getMe()->getTag(inTagNo), false);
 	}
 	MetaTag* MetaTagList::getTag(String* inName) {
 		wchar_t* tc = Wrappers::netStrToWStr( inName );
 		wstring locStr = tc;
-		MetaTag* retVal = new MetaTag(getMe()->getTag(locStr));
+		MetaTag* retVal = new MetaTag(getMe()->getTag(locStr), false);
 		Wrappers::releaseWStr( tc );
 		return retVal;
 

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -43,12 +43,16 @@
 		mBaseClass = new C_ParamTag;
 	}
 
-	ParamTag::ParamTag(C_ParamTag* inTag) {
+	ParamTag::ParamTag(C_ParamTag* inTag, bool inDeleteBase) {
 		mBaseClass = inTag;
+		mDeleteBase = inDeleteBase;
 	}
 	ParamTag::~ParamTag(void)
 	{
-		delete mBaseClass;
+		if (mDeleteBase) {
+			delete mBaseClass;
+		}
+		mBaseClass = NULL;
 	}
 
 	C_ParamTag* ParamTag::getMe() {

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.h	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTag.h	2005-01-11 09:18:55 UTC (rev 8721)
@@ -53,7 +53,7 @@
 	{
 	public:
 		ParamTag(void);
-		ParamTag(C_ParamTag* inTag);
+		ParamTag(C_ParamTag* inTag, bool inDeleteBase);
 		virtual ~ParamTag(void);
 
 		//Other

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -43,18 +43,22 @@
 		mBaseClass = new C_ParamTagList;
 	}
 
-	ParamTagList::ParamTagList(C_ParamTagList* inTagList) {
+	ParamTagList::ParamTagList(C_ParamTagList* inTagList, bool inDeleteBase) {
+		mDeleteBase = inDeleteBase;
 		mBaseClass = inTagList;
 
 	}
 
 	ParamTagList::~ParamTagList(void)
 	{
-		delete mBaseClass;
+		if (mDeleteBase) {
+			delete mBaseClass;
+		}
+		mBaseClass = NULL;
 	}
 	//Accessors
 	ParamTag* ParamTagList::getTag(unsigned long inTagNo) {
-		return new ParamTag(getMe()->getTag(inTagNo)->clone());
+		return new ParamTag(getMe()->getTag(inTagNo), false);
 	}
 
 	//Mutators

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.h	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ParamTagList.h	2005-01-11 09:18:55 UTC (rev 8721)
@@ -53,7 +53,7 @@
 	{
 	public:
 		ParamTagList(void);
-		ParamTagList(C_ParamTagList* inTagList);
+		ParamTagList(C_ParamTagList* inTagList, bool inDeleteBase);
 		virtual ~ParamTagList(void);
 
 		//Accessors

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.cpp	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.cpp	2005-01-11 09:18:55 UTC (rev 8721)
@@ -43,15 +43,19 @@
 		mBaseClass = new C_TitleTag;
 	}
 
-	TitleTag::TitleTag(C_TitleTag* inTag)
+	TitleTag::TitleTag(C_TitleTag* inTag, bool inDeleteBase)
 	{
+		mDeleteBase = inDeleteBase;
 		mBaseClass = inTag;
 	}
 
 
 	TitleTag::~TitleTag(void)
 	{
-		delete mBaseClass;
+		if (mDeleteBase) {
+			delete mBaseClass;
+		}
+		mBaseClass = NULL;
 	}
 	String* TitleTag::toString() {
 		return Wrappers::WStrToNetStr( getMe()->toString().c_str() );

Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.h	2005-01-10 20:30:05 UTC (rev 8720)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/TitleTag.h	2005-01-11 09:18:55 UTC (rev 8721)
@@ -59,7 +59,7 @@
 	{
 	public:
 		TitleTag(void);
-		TitleTag(C_TitleTag* inTag);
+		TitleTag(C_TitleTag* inTag, bool inDeleteBase);
 		virtual ~TitleTag(void);
 		//Other
 		virtual String* toString();



More information about the commits mailing list