[xiph-commits] r8048 - trunk/oggdsf/src/lib/core/ogg/libOOOggSeek

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Oct 17 11:58:17 PDT 2004


Author: illiminable
Date: 2004-10-17 11:58:17 -0700 (Sun, 17 Oct 2004)
New Revision: 8048

Modified:
   trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
Log:
* Fixed a small leak in the seek table.

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-10-17 18:32:12 UTC (rev 8047)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-10-17 18:58:17 UTC (rev 8048)
@@ -50,7 +50,7 @@
 {
 	
 	mFileName = inFileName;
-	mOggDemux = new OggDataBuffer(true);
+	mOggDemux = new OggDataBuffer(true);			//Deleted in destructor.
 	mOggDemux->registerVirtualCallback(this);
 	debugLog.open("G:\\logs\\seektable.log", ios_base::out);
 	debugLog<<"Constructing seek table for "<<inFileName<<endl;
@@ -223,11 +223,12 @@
 		debugLog<<"Opening file... "<<endl;
 		mFile.open(mFileName.c_str(), ios_base::in | ios_base::binary);
 		const unsigned long BUFF_SIZE = 4096;
-		unsigned char* locBuff = new unsigned char[BUFF_SIZE];
+		unsigned char* locBuff = new unsigned char[BUFF_SIZE];		//Deleted this function.
 		while (!mFile.eof()) {
 			mFile.read((char*)locBuff, BUFF_SIZE);
 			mOggDemux->feed((const unsigned char*)locBuff, mFile.gcount());
 		}
+		delete[] locBuff;
 		debugLog<<"Closing File..."<<endl;
 		mFile.close();
 		



More information about the commits mailing list