[Scummvm-cvs-logs] SF.net SVN: scummvm:[47653] scummvm/trunk/engines/sci/engine/klists.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jan 28 22:05:43 CET 2010


Revision: 47653
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47653&view=rev
Author:   thebluegr
Date:     2010-01-28 21:05:42 +0000 (Thu, 28 Jan 2010)

Log Message:
-----------
kDisposeList() is not needed according to waltervn, as the garbage collector automatically clears unused objects

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/klists.cpp

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2010-01-28 21:05:10 UTC (rev 47652)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2010-01-28 21:05:42 UTC (rev 47653)
@@ -123,6 +123,10 @@
 }
 
 reg_t kDisposeList(EngineState *s, int argc, reg_t *argv) {
+	// This function is not needed in ScummVM. The garbage collector
+	// cleans up unused objects automatically
+
+#if 0
 	List *l = s->_segMan->lookupList(argv[0]);
 
 	if (!l) {
@@ -141,16 +145,11 @@
 			n_addr = n->succ;
 
 			//s->_segMan->free_Node(n_addr);	// TODO
-
-			// Clear the node
-			n->key = NULL_REG;
-			n->pred = NULL_REG;
-			n->succ = NULL_REG;
-			n->value = NULL_REG;
 		}
 	}
 
 	//s->_segMan->free_list(argv[0]);	// TODO
+#endif
 
 	return s->r_acc;
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list