aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDima Kogan2015-09-15 11:53:54 -0700
committerPaul Eggert2015-09-16 09:27:51 -0700
commitd605a539d4863c7e7c66aaea6e538ae14c47f3d7 (patch)
tree164f1fb7e9859060d0e2f45dcada55f9a2602e3a
parentb0f4acfcb739358d98e3e4d78263467edb53e968 (diff)
downloademacs-d605a539d4863c7e7c66aaea6e538ae14c47f3d7.tar.gz
emacs-d605a539d4863c7e7c66aaea6e538ae14c47f3d7.zip
winner no longer holds on to dead frames
* lisp/winner.el (winner-change-fun): Cull dead frames. This prevents a potentially massive memory leak. See: http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00619.html
-rw-r--r--lisp/winner.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/winner.el b/lisp/winner.el
index fdf62137514..a05f4ba867e 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -177,6 +177,11 @@ You may want to include buffer names such as *Help*, *Apropos*,
177;; Called whenever the window configuration changes 177;; Called whenever the window configuration changes
178;; (a `window-configuration-change-hook'). 178;; (a `window-configuration-change-hook').
179(defun winner-change-fun () 179(defun winner-change-fun ()
180
181 ;; Cull dead frames.
182 (setq winner-modified-list
183 (cl-remove-if-not 'frame-live-p winner-modified-list))
184
180 (unless (or (memq (selected-frame) winner-modified-list) 185 (unless (or (memq (selected-frame) winner-modified-list)
181 (/= 0 (minibuffer-depth))) 186 (/= 0 (minibuffer-depth)))
182 (push (selected-frame) winner-modified-list))) 187 (push (selected-frame) winner-modified-list)))