[Avida-cvs] [avida-svn] r428 - trunk/source/cpu
brysonda@myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Tue Dec 27 13:12:20 PST 2005
Author: brysonda
Date: 2005-12-27 16:12:20 -0500 (Tue, 27 Dec 2005)
New Revision: 428
Modified:
trunk/source/cpu/cHardwareFactory.cc
Log:
Add in a preprocessor conditional block to toggle hardware recycling in order to test a hunch regarding the reproducibility problems. The default right now is for it to be disabled. It can be enabled by defining HARDWARE_RECYCLING.
Modified: trunk/source/cpu/cHardwareFactory.cc
===================================================================
--- trunk/source/cpu/cHardwareFactory.cc 2005-12-22 16:57:25 UTC (rev 427)
+++ trunk/source/cpu/cHardwareFactory.cc 2005-12-27 21:12:20 UTC (rev 428)
@@ -59,7 +59,11 @@
// Recycled hardware may be *briefly* in use, so don't delete immediately.
void cHardwareFactory::Recycle(cHardwareBase * out_hardware)
{
+#ifdef HARDWARE_RECYCLING
hardware_cpu_list.Push(out_hardware);
+#else
+ delete out_hardware;
+#endif
}
// Delete any hardware that needs it, save the rest for re-use.
More information about the Avida-cvs
mailing list