File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
6060 }
6161 }
6262
63+ override public function destroy (): Void
64+ {
65+ if (analyzer != null )
66+ {
67+ analyzer .cleanup ();
68+ }
69+
70+ super .destroy ();
71+ }
72+
6373 public function initAnalyzer (): Void
6474 {
6575 if (snd == null ) return ;
@@ -86,7 +96,12 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
8696 public function dumpSound (): Void
8797 {
8898 snd = null ;
89- analyzer = null ;
99+
100+ if (analyzer != null )
101+ {
102+ analyzer .cleanup ();
103+ analyzer = null ;
104+ }
90105 }
91106
92107 var visTimer : Float = - 1 ;
Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ class CharSelectGF extends FunkinSprite implements IBPMSyncedScriptedClass
2727 switchGF (Constants .DEFAULT_CHARACTER );
2828 }
2929
30+ override public function destroy (): Void
31+ {
32+ if (analyzer != null )
33+ {
34+ analyzer .cleanup ();
35+ }
36+
37+ super .destroy ();
38+ }
39+
3040 public function onStepHit (event : SongTimeScriptEvent ): Void {}
3141
3242 public function onBeatHit (event : SongTimeScriptEvent ): Void
You can’t perform that action at this time.
0 commit comments