Skip to content

Commit 7fa5b68

Browse files
committed
Merge pull request #499 from RyanGordon/viewer_memory_leak_fix
Fix Memory Leak in Viewer.cpp
2 parents 81a59a1 + 2a8269b commit 7fa5b68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/viewer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ bool Viewer::render()
225225
glDrawArrays(GL_TRIANGLES, 0, 6);
226226
ir.deallocate();
227227
}
228+
229+
gl()->glDeleteBuffers(1, &triangle_vbo);
230+
gl()->glDeleteVertexArrays(1, &triangle_vao);
228231
}
229232

230233
// put the stuff we've been drawing onto the display

0 commit comments

Comments
 (0)