Skip to content

Commit c99fd24

Browse files
ACrazyTownHundrec
authored andcommitted
1 parent 50c601a commit c99fd24

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

source/funkin/audio/visualize/ABotVis.hx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
5959
}
6060
}
6161

62+
override public function destroy():Void
63+
{
64+
if (analyzer != null)
65+
{
66+
analyzer.cleanup();
67+
}
68+
69+
super.destroy();
70+
}
71+
6272
public function initAnalyzer():Void
6373
{
6474
if (snd == null) return;
@@ -85,7 +95,12 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
8595
public function dumpSound():Void
8696
{
8797
snd = null;
88-
analyzer = null;
98+
99+
if (analyzer != null)
100+
{
101+
analyzer.cleanup();
102+
analyzer = null;
103+
}
89104
}
90105

91106
var visTimer:Float = -1;

source/funkin/ui/charSelect/CharSelectGF.hx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ class CharSelectGF extends FlxAtlasSprite implements IBPMSyncedScriptedClass
3737
switchGF("bf");
3838
}
3939

40+
override public function destroy():Void
41+
{
42+
if (analyzer != null)
43+
{
44+
analyzer.cleanup();
45+
}
46+
47+
super.destroy();
48+
}
49+
4050
override public function update(elapsed:Float):Void
4151
{
4252
super.update(elapsed);

0 commit comments

Comments
 (0)