Skip to content

Commit

Permalink
[Tests] Free OpenTK when disposing TestaApplication
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Dec 12, 2023
1 parent f91a039 commit 5df6e2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tests/Aardvark.Rendering.Tests/Tests/Application.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module TestApplication =
RuntimeConfig.UseNewRenderTask <- true
RuntimeConfig.PreferHostSideTextureCompression <- true

Toolkit.Init(ToolkitOptions(Backend = PlatformBackend.PreferNative)) |> ignore
let toolkit = Toolkit.Init(ToolkitOptions(Backend = PlatformBackend.PreferNative))

let runtime = new Runtime(debug)
let ctx = new Context(runtime, fun () -> ContextHandleOpenTK.create runtime.DebugConfig)
Expand Down Expand Up @@ -59,10 +59,10 @@ module TestApplication =
runtime,
{ new IDisposable with
member x.Dispose() =
runtime.Dispose()
checkForDebugErrors()
checkForErrors()
ctx.Dispose()
runtime.Dispose()
toolkit.Dispose()
}
)

Expand Down

0 comments on commit 5df6e2e

Please sign in to comment.