emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d605a53: winner no longer holds on to dead frames


From: Paul Eggert
Subject: [Emacs-diffs] master d605a53: winner no longer holds on to dead frames
Date: Wed, 16 Sep 2015 16:27:58 +0000

branch: master
commit d605a539d4863c7e7c66aaea6e538ae14c47f3d7
Author: Dima Kogan <address@hidden>
Commit: Paul Eggert <address@hidden>

    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
---
 lisp/winner.el |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lisp/winner.el b/lisp/winner.el
index fdf6213..a05f4ba 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]