js: Explicitly dispose all cairo contexts

Due to limitations and bugs in SpiderMonkey's GC, wrapper objects
for cairo contexts and similar may not get cleaned up immediately
after repainting, leading to leaking memory. Explicitly disposing
of such objects after they're not needed can clean up large portions
of memory for cairo surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=685513
This commit is contained in:
Jasper St. Pierre
2013-01-07 15:07:40 -05:00
parent 8410fc38c9
commit 9548cd8341
7 changed files with 20 additions and 11 deletions

View File

@ -388,6 +388,8 @@ const BoxPointer = new Lang.Class({
cr.setLineWidth(borderWidth);
cr.stroke();
}
cr.$dispose();
},
setPosition: function(sourceActor, alignment) {