Branch: Tag:

2000-08-22

2000-08-22 17:20:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added cleanup_gc() to fix memory leak.

Rev: src/gc.c:1.125

30:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.124 2000/08/17 18:57:37 grubba Exp $"); + RCSID("$Id: gc.c,v 1.125 2000/08/22 17:20:38 grubba Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is
2222:       f_aggregate_mapping(14);   } +  + void cleanup_gc(void) + { + #ifdef PIKE_DEBUG +  if (gc_evaluator_callback) { +  remove_callback(gc_evaluator_callback); +  gc_evaluator_callback = NULL; +  } + #endif /* PIKE_DEBUG */ + }