Skip to content

Commit d666f12

Browse files
errata-cjdm
authored andcommitted
Added drop impl to GLBufferDataReceiver
1 parent 65d8c7d commit d666f12

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gl/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,14 @@ pub struct GLBufferDataReceiver {
15141514
target: BufferTarget,
15151515
}
15161516

1517+
impl Drop for GLBufferDataReceiver {
1518+
fn drop(&mut self) {
1519+
unsafe {
1520+
gl::DeleteSync(self.gl_sync);
1521+
}
1522+
}
1523+
}
1524+
15171525
pub struct GLTextureDataReceiver {
15181526
gl_pixel_buffer: GLuint,
15191527
gl_sync: GLsync,

0 commit comments

Comments
 (0)