There is no point on freeing memory as the OS will do it for us.
}
- void Dtor()
- {
- if (gcx)
- {
- gcx.Dtor();
- cstdlib.free(gcx);
- gcx = null;
- }
- }
-
-
/**
*
*/
}
- void Dtor()
- {
- inited = 0;
-
- for (size_t i = 0; i < npools; i++)
- {
- Pool *pool = pooltable[i];
- pool.Dtor();
- cstdlib.free(pool);
- }
-
- // Even when free() can be called with a null pointer, the extra call
- // might be significant. On hard GC benchmarks making the test for null
- // here (i.e. not making the call) can reduce the GC time by almost
- // ~5%.
- if (pooltable)
- cstdlib.free(pooltable);
- if (roots)
- cstdlib.free(roots);
- if (ranges)
- cstdlib.free(ranges);
- }
-
-
void Invariant() { }
//
_gc.fullCollectNoStack(); // not really a 'collect all' -- still scans
// static data area, roots, and ranges.
- _gc.Dtor();
} else {
// default (safe) clenup
_gc.fullCollect();