From efb1ccb07ede97dadd6926e261f90a3e9f0b9b2b Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Tue, 8 Apr 2014 14:34:36 -0700 Subject: [PATCH] Destroy LayerBuffers before dropping them This should fix a potential pixmap leak and task failure when the LayerBuffer is dropped (#1187). --- src/components/gfx/buffer_map.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/gfx/buffer_map.rs b/src/components/gfx/buffer_map.rs index 4c9b8950d94..7980e16c421 100644 --- a/src/components/gfx/buffer_map.rs +++ b/src/components/gfx/buffer_map.rs @@ -83,6 +83,7 @@ impl BufferMap { // memory limit, no need to store this new buffer; just let it drop. if self.mem + new_buffer.get_mem() > self.max_mem && self.map.len() == 1 && self.map.contains_key(&new_key) { + new_buffer.destroy(graphics_context); return; }