mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-02 08:58:32 +00:00
fix: optimize quick js runtime
This commit is contained in:
@@ -807,7 +807,17 @@ const handler = async function (argv) {
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup: Clear hook managers map (will be garbage collected)
|
||||
// Cleanup: Dispose all HookManagers to free VM resources, then clear the map
|
||||
// This is critical to prevent memory leaks from persisted QuickJS VMs
|
||||
hookManagersMap.forEach((hookManager) => {
|
||||
if (hookManager && typeof hookManager.dispose === 'function') {
|
||||
try {
|
||||
hookManager.dispose();
|
||||
} catch (e) {
|
||||
// Ignore disposal errors
|
||||
}
|
||||
}
|
||||
});
|
||||
hookManagersMap.clear();
|
||||
|
||||
const summary = printRunSummary(results);
|
||||
|
||||
Reference in New Issue
Block a user