Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions source/SkiaSharp.Views/SkiaSharp.Views.WPF/SKGLElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ private void Release()
public void Dispose()
{
Dispose(true);

#if NET6_0_OR_GREATER
base.Dispose();
#else
// Older version of OpenTK do not implement IDisposable
// And there is also a possible memory leak in the base class
// https://github.com/opentk/GLWpfControl/issues/126
// ToDo: Update OpenTK? manually dispose the base class?
#endif
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<PackageReference Include="OpenTK.GLWpfControl" Version="3.3.0" NoWarn="NU1701" />
</ItemGroup>
<ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="OpenTK" Version="4.3.0" NoWarn="NU1701" />
<PackageReference Include="OpenTK.GLWpfControl" Version="4.2.3" />
<PackageReference Include="OpenTK" Version="4.9.4" NoWarn="NU1701" />
<PackageReference Include="OpenTK.GLWpfControl" Version="4.3.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\binding\SkiaSharp\SkiaSharp.csproj" />
Expand Down