mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
Fix historyHook memory leak
updateHistory leaks unfiltered windows from previous states as it is never forced. The consumer of such data structure is not visible to ghc, so the demand analysis has to fallback on pure laziness. We fix this inserting evaluation points on the `historyHook` function. We do this for two reasons, this is the only function calling `updateHistory`. Plus we cannot do it clearly at the `updateHistory` function as we operate inside a continuation on withWindowSet. In respect to the `put`, everything would be a big thunk.
This commit is contained in:
@@ -61,7 +61,8 @@ library
|
||||
unix,
|
||||
X11 >= 1.10 && < 1.11,
|
||||
xmonad >= 0.16.99999 && < 0.18,
|
||||
utf8-string
|
||||
utf8-string,
|
||||
parallel
|
||||
default-language: Haskell2010
|
||||
|
||||
cpp-options: -DXMONAD_CONTRIB_VERSION_MAJOR=0
|
||||
@@ -448,6 +449,7 @@ test-suite tests
|
||||
, process
|
||||
, unix
|
||||
, utf8-string
|
||||
, parallel
|
||||
, xmonad >= 0.16.9999 && < 0.18
|
||||
cpp-options: -DTESTING
|
||||
ghc-options: -Wall -Wno-unused-do-bind
|
||||
|
Reference in New Issue
Block a user