- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for MustGarbageCollect (0.13 sec)
-
tests/util/leak/check.go
if err := check(nil); err != nil { log.Errorf("fatal: %v", err) exitCode = 1 } } os.Exit(exitCode) } // MustGarbageCollect asserts that an object was garbage collected by the end of the test. // The input must be a pointer to an object. func MustGarbageCollect(tb test.Failer, i any) { tb.Helper() collected := atomic.NewBool(false) runtime.SetFinalizer(i, func(x any) { collected.Store(true) })
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Dec 20 10:22:38 UTC 2023 - 6.9K bytes - Viewed (0)