From 49408c0695cc603988c927dfe3249a44ac17011c Mon Sep 17 00:00:00 2001 From: falsycat Date: Fri, 18 Oct 2019 00:00:00 +0000 Subject: [PATCH] [update] Made GC to collect forcibly before start playing music. --- src/sj/LoadingScene.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sj/LoadingScene.d b/src/sj/LoadingScene.d index dee422c..c704309 100644 --- a/src/sj/LoadingScene.d +++ b/src/sj/LoadingScene.d @@ -1,6 +1,8 @@ /// License: MIT module sj.LoadingScene; +import core.memory; + import std.math, std.typecons; @@ -95,6 +97,8 @@ class LoadingScene : SceneInterface { if (anime_.isFinished) { // TODO: parallelize context creation auto context = music_.CreatePlayerContext(posteffect_, programs_.player); + GC.collect(); + play_scene_.Initialize(music_, context, offset_beat_); return play_scene_; }