summaryrefslogtreecommitdiff
path: root/display.js
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2013-09-12 10:13:47 -0500
committerJeremy White <jwhite@codeweavers.com>2013-09-12 10:13:47 -0500
commit366c0a3fca91ec8229f95a7583f8fefad2d32350 (patch)
tree42ff04660de6fc72b7b413ed235de58950044fd6 /display.js
parentc2bb090b160c12680537b5b67e9d60ff944e3877 (diff)
Give the Garbage collector a clue to recycle images; avoids
fairly massive memory leaks during video playback.
Diffstat (limited to 'display.js')
-rw-r--r--display.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/display.js b/display.js
index f9bfe76..d0d0994 100644
--- a/display.js
+++ b/display.js
@@ -778,6 +778,10 @@ function handle_draw_jpeg_onload()
{
context.drawImage(this, this.o.base.box.left, this.o.base.box.top);
+ // Give the Garbage collector a clue to recycle this; avoids
+ // fairly massive memory leaks during video playback
+ this.src = null;
+
if (this.o.descriptor &&
(this.o.descriptor.flags & SPICE_IMAGE_FLAGS_CACHE_ME))
{