Commit d605a539 authored by Dima Kogan's avatar Dima Kogan Committed by Paul Eggert
Browse files

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
parent b0f4acfc
......@@ -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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment