From 9c371dfe4e96a2134e36a583c792ca31b08d3ade Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Tue, 24 Oct 2023 09:57:39 +1300 Subject: [PATCH] Give up on addressing all memory leaks. --- app/Integration.hs | 2 +- app/Integration2.hs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Integration.hs b/app/Integration.hs index 7d68d53..4a3916d 100644 --- a/app/Integration.hs +++ b/app/Integration.hs @@ -146,7 +146,7 @@ main = do present renderer unless (QuitEvent `elem` events) loop SDL.quit - FC.fini + -- FC.fini -- FIXME: Need to free all Haskell data before freeing FontConfig's data Nil = Nil deriving Eq instance PropertyParser Nil where diff --git a/app/Integration2.hs b/app/Integration2.hs index d947d16..cf3adad 100644 --- a/app/Integration2.hs +++ b/app/Integration2.hs @@ -23,6 +23,7 @@ import qualified Graphics.Text.Font.Choose as FC import Control.Concurrent.MVar (putMVar, newEmptyMVar, readMVar) import Control.Concurrent (forkIO) import Control.DeepSeq (NFData(..), ($!!)) +--import System.Mem (performGC) resolve' = CSSCond.resolve lowerVars lowerToks lowerVars _ = CSSCond.B False @@ -51,7 +52,9 @@ main = do layout `seq` print "Laying out page!" res <- forkCompute $ boxLayout zeroBox { size = Size 1280 480 } layout False readMVar res - FC.fini + --performGC + --FC.fini -- FIXME: GC still left FontConfig references... + return () data Nil = Nil deriving Eq instance Style.PropertyParser Nil where -- 2.30.2