Skip to content

Commit

Permalink
Fixed a possible leak where timer is not disposed.
Browse files Browse the repository at this point in the history
  • Loading branch information
hozuki committed Jan 17, 2018
1 parent 0ce0392 commit b67a919
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Apps/ScoreViewer/ScorePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,12 @@ public sealed class ScorePlayer : DisposableBase {
var allData = transformedStream.ReadToEnd();
_audioBuffer.BufferData(allData, stream.WaveFormat.SampleRate);
_audioSource.Bind(_audioBuffer);

//if (transformedStream != stream) {
// transformedStream.Dispose();
//}
}

protected override void Dispose(bool disposing) {
PlayerSettings.MusicVolumeChanged -= OnMusicVolumeChanged;
_timer.Stop();
_timer.Dispose();

Stop();

Expand Down

0 comments on commit b67a919

Please sign in to comment.