Skip to content

Commit

Permalink
Merge pull request #6211 from smoogipoo/fix-incorrect-disposal
Browse files Browse the repository at this point in the history
Fix incorrect disposal pattern
  • Loading branch information
bdach committed Mar 11, 2024
2 parents cb0ac0e + 9539e8e commit 0c80e41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions osu.Framework/Graphics/Veldrid/Textures/VeldridTexture.cs
Expand Up @@ -108,17 +108,17 @@ protected virtual TextureUsage Usages

public void Dispose()
{
if (isDisposed)
return;

isDisposed = true;

Dispose(true);
GC.SuppressFinalize(this);
}

protected virtual void Dispose(bool isDisposing)
{
if (isDisposed)
return;

isDisposed = true;

Renderer.ScheduleDisposal(texture =>
{
while (texture.tryGetNextUpload(out var upload))
Expand Down

0 comments on commit 0c80e41

Please sign in to comment.