From: Dima Kogan Date: Tue, 15 Sep 2015 18:53:54 +0000 (-0700) Subject: winner no longer holds on to dead frames X-Git-Tag: emacs-25.0.90~1224^2~101 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d605a539d4863c7e7c66aaea6e538ae14c47f3d7;p=emacs.git 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 --- 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*, ;; Called whenever the window configuration changes ;; (a `window-configuration-change-hook'). (defun winner-change-fun () + + ;; Cull dead frames. + (setq winner-modified-list + (cl-remove-if-not 'frame-live-p winner-modified-list)) + (unless (or (memq (selected-frame) winner-modified-list) (/= 0 (minibuffer-depth))) (push (selected-frame) winner-modified-list)))