Author: toad
Date: 2009-03-20 22:54:26 +0000 (Fri, 20 Mar 2009)
New Revision: 26125
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
If the data isn't compressed, free it if freeData is true; if it is compressed,
always free it [ the compressed data ]
Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
2009-03-20 22:49:16 UTC (rev 26124)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
2009-03-20 22:54:26 UTC (rev 26125)
@@ -195,10 +195,10 @@
Bucket data = bestCompressedData;
COMPRESSOR_TYPE bestCodec = output.bestCodec;
- boolean shouldFreeData = false;
+ boolean shouldFreeData = freeData;
if(bestCodec != null) {
if(logMINOR) Logger.minor(this, "The best compression
algorithm is "+bestCodec+ " we have gained"+
(100-(bestCompressedDataSize*100/origSize)) +"% !
("+origSize+'/'+bestCompressedDataSize+')');
- shouldFreeData = true;
+ shouldFreeData = true; // must be freed regardless of
whether the original data was to be freed
} else {
data = block.getData();
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs