Remove GC timers upon ascension #772

This commit is contained in:
Daniël van Noord
2021-04-29 23:09:23 +02:00
parent e4cdc6b85a
commit f47e1f59fe
5 changed files with 18 additions and 4 deletions

12
src/Main/ResetHook.js Normal file
View File

@@ -0,0 +1,12 @@
import { GCTimers } from '../Disp/VariablesAndData';
/**
* This is called when the user ascends
* It is called by CM.Main.Loop
*/
export default function CMRestHook() {
Object.keys(GCTimers).forEach((i) => {
GCTimers[i].parentNode.removeChild(GCTimers[i]);
delete GCTimers[i];
});
}