fix the GC

This commit is contained in:
nek0 2023-04-29 00:58:41 +02:00
parent 064f31197e
commit 744a8ddc55

View file

@ -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)