Mercurial > octave-nkf
diff libinterp/interpfcn/symtab.cc @ 16644:856cb7cba231 classdef
maint: periodic merge of default to classdef
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 12 May 2013 21:45:57 -0400 |
parents | 2ed5bc680c71 2f8fb02a6c31 |
children | 7368654f302f |
line wrap: on
line diff
--- a/libinterp/interpfcn/symtab.cc Mon Apr 29 19:13:40 2013 -0400 +++ b/libinterp/interpfcn/symtab.cc Sun May 12 21:45:57 2013 -0400 @@ -1494,27 +1494,12 @@ void symbol_table::cleanup (void) { - // Clear variables in top scope. - all_instances[xtop_scope]->clear_variables (); - - // Clear function table. This is a hard clear, ignoring mlocked functions. - fcn_table.clear (); - - // Clear variables in global scope. - // FIXME: are there any? - all_instances[xglobal_scope]->clear_variables (); - - // Clear global variables. - global_table.clear (); + clear_all (true); // Delete all possibly remaining scopes. for (all_instances_iterator iter = all_instances.begin (); iter != all_instances.end (); iter++) { - scope_id scope = iter->first; - if (scope != xglobal_scope && scope != xtop_scope) - scope_id_cache::free (scope); - // First zero the table entry to avoid possible duplicate delete. symbol_table *inst = iter->second; iter->second = 0; @@ -1523,6 +1508,12 @@ // deleting other scopes. delete inst; } + + global_table.clear (); + fcn_table.clear (); + class_precedence_table.clear (); + parent_map.clear (); + all_instances.clear (); } void