int finalize() { bool passed = TestRunner::getDefault().passed(); singleton.destroy(); // Finalize the garbage collector to ensure memory if freed before exiting. GarbageCollector::instance().finalize(); return passed ? 0 : 1; }
void GarbageCollector::destroy() { singleton.destroy(); }