From a83fca1430c15dcbe29a897fac55d9c48aa93eb1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 28 Jan 2010 21:05:42 +0000 Subject: [PATCH] kDisposeList() is not needed according to waltervn, as the garbage collector automatically clears unused objects svn-id: r47653 --- engines/sci/engine/klists.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 86ddc2a2d0b..135f153298a 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -123,6 +123,10 @@ reg_t kNewList(EngineState *s, int argc, reg_t *argv) { } 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 @@ reg_t kDisposeList(EngineState *s, int argc, reg_t *argv) { 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; }