mirror of https://github.com/iconify/api.git
fix: attempt to call garbage collector after purging stored item
This commit is contained in:
parent
d27c6e36a8
commit
3cec4e44d5
|
|
@ -37,6 +37,11 @@ export function cleanupStoredItem<T>(storage: MemoryStorage<T>, storedItem: Memo
|
|||
stopTimer(storage);
|
||||
}
|
||||
|
||||
// Purge unused memory if garbage collector global is exposed
|
||||
try {
|
||||
global.gc?.();
|
||||
} catch {}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue