From 744a8ddc55a953d444dcc4a34752370050895185 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 29 Apr 2023 00:58:41 +0200 Subject: [PATCH] fix the GC --- src/Main.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Main.hs b/src/Main.hs index 7c082c8..9ba1223 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -13,6 +13,7 @@ import qualified Data.Map.Strict as M import qualified Data.Vector as V import Data.Word import qualified SDL hiding (V2) +import System.Mem import qualified Vulkan as Vk import qualified Vulkan.Zero as Vk @@ -46,6 +47,7 @@ main = do (liftIO $ STM.atomically $ STM.readTMVar quit ) ( do + liftIO performMajorGC number <- liftIO $ STM.atomically $ do number <- STM.readTMVar frameNumber void $ STM.swapTMVar frameNumber (succ number)