Skip to content

Commit f3fafa1

Browse files
committed
test(rtc): clear gc garbage and reset debug flags in ctypes array test
1 parent 33b7d78 commit f3fafa1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎livekit-rtc/tests/test_ffi_client.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@
2727
2828
gc.collect()
2929
gc.set_debug(gc.DEBUG_SAVEALL)
30-
for _ in range(10):
30+
for _ in range(5):
3131
apm = rtc.AudioProcessingModule()
3232
apm._ffi_handle.dispose()
3333
gc.collect()
34-
print(sum(isinstance(o, type(ctypes.Array)) for o in gc.garbage))
34+
count = sum(isinstance(o, type(ctypes.Array)) for o in gc.garbage)
35+
gc.set_debug(0)
36+
gc.garbage.clear()
37+
print(count)
3538
"""
3639

3740

0 commit comments

Comments
 (0)