Skip to content

Commit 0ae3239

Browse files
committed
WIP: GC
1 parent 6c74dd2 commit 0ae3239

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src-control/Control/RefCount.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,14 @@ enableForgottenRefChecks :: IO ()
605605
disableForgottenRefChecks :: IO ()
606606

607607
#ifdef NO_IGNORE_ASSERTS
608-
enableForgottenRefChecks =
608+
enableForgottenRefChecks = do
609+
performMajorGCWithBlockingIfAvailable
609610
modifyIORef globalForgottenRef $ \case
610611
Disabled -> Enabled Nothing
611612
Enabled _ -> error "enableForgottenRefChecks: already enabled"
612613

613-
disableForgottenRefChecks =
614+
disableForgottenRefChecks = do
615+
performMajorGCWithBlockingIfAvailable
614616
modifyIORef globalForgottenRef $ \case
615617
Disabled -> error "disableForgottenRefChecks: already disabled"
616618
Enabled Nothing -> Disabled

0 commit comments

Comments
 (0)