Skip to content

Commit c8b49d2

Browse files
committed
Immediately dispose the draw session
1 parent 4ca0340 commit c8b49d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CollapseLauncher/Classes/Helper/Background/Loaders/MediaPlayerLoader.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,8 @@ public void DisposeMediaModules()
265265
{
266266
lock (_currentLock)
267267
{
268-
while (_currentCanvasDrawingSession is not null)
269-
{
270-
Thread.Sleep(100);
271-
}
268+
_currentCanvasDrawingSession?.Dispose();
269+
Interlocked.Exchange(ref _currentCanvasDrawingSession, null);
272270
}
273271
}
274272

0 commit comments

Comments
 (0)