GNU bug report logs -
#6230
23.2; Pixmaps kept in X11 after (svg?) images no longer are used
Previous Next
Reported by: Anders Waldenborg <anders <at> 0x63.nu>
Date: Thu, 20 May 2010 15:51:02 UTC
Severity: normal
Found in version 23.2
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 05/20/2010 07:16 PM, Chong Yidong wrote:
> You can run (clear-image-cache) to eliminate the image data. Emacs also
> does this automatically, every hundred redisplays.
>
Thanks,
I can confirm that running (clear-image-cache) removes them from the X
server.
However I can't see that it is done every 100 redisplays. If it were I
would expect the code below to never create more than 100 (+ the ones
that were there before it started) pixmaps in X11. Letting it run while
writing this mail it now has reached above 3000 pixmaps according to
xrestop.
(defun aw-svg-image-test-update (buf)
(interactive)
(with-current-buffer buf
(erase-buffer)
(insert-image (create-image (format "<svg width=\"50\"
height=\"50\"><rect x=\"0\" y=\"0\" width=\"100\" height=\"100\"
fill=\"#%02x%02x%02x\"/></svg>" (random 255)(random 255)(random 255))
'svg t))))
(defun aw-svg-image-test-kill-buffer-hook ()
(cancel-timer aw-svg-image-test-timer))
(defun aw-svg-image-test ()
(interactive)
(with-current-buffer (generate-new-buffer "*aw-svg-image-test*")
(display-buffer (current-buffer))
(make-local-variable 'aw-svg-image-test-timer)
(add-hook 'kill-buffer-hook 'aw-svg-image-test-kill-buffer-hook nil t)
(setq aw-svg-image-test-timer (run-at-time nil 0.2
'aw-svg-image-test-update (current-buffer)))))
anders
This bug report was last modified 15 years and 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.