Changeset 1123


Ignore:
Timestamp:
Aug 7, 2003, 11:11:38 PM (17 years ago)
Author:
sveta
Message:
  • Bugs at work with memory are corrected (added counter of table number).
Location:
to-imperative/trunk/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/rf_table.hh

    r1059 r1123  
    1919 
    2020  static ObjectRegister reg;
    21   TableNode* root;    // root of RB-tree 
     21  TableNode* root;    // root of RB-tree
     22  static size_t count; 
    2223
    2324  void insert_node (TableNode*);
  • to-imperative/trunk/runtime/rf_table.ih

    r1059 r1123  
    2222  }
    2323  root = TableNode::nil;
     24  count ++;
    2425}
    2526
     
    5253   if (root != TableNode::nil)
    5354     delete_tree(root);
     55   count--;
     56   if (!count)
     57     delete(TableNode::nil);
    5458}
    5559
Note: See TracChangeset for help on using the changeset viewer.