Skip to content

Commit c626abf

Browse files
committed
[GL] fixed VAO leak when disposing a context
1 parent ebd7985 commit c626abf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Aardvark.Rendering.GL/Core/ContextHandles.fs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,11 @@ type ContextHandle(handle : IGraphicsContext, window : IWindowInfo) =
217217
if not isDisposed then
218218

219219
// release potentially pending UnsharedObjects
220-
let actions = Interlocked.Exchange(&onMakeCurrent, null)
221-
if actions <> null then
222-
x.Use(fun () ->
220+
x.Use(fun () ->
221+
GLVM.hglCleanup((unbox<IGraphicsContextInternal> handle).Context.Handle)
222+
223+
let actions = Interlocked.Exchange(&onMakeCurrent, null)
224+
if actions <> null then
223225
for a in actions do
224226
a()
225227
)

0 commit comments

Comments
 (0)