tests/micropython: Fully unlink nested list in extreme exc test.

To make sure there are no dangling references to the lists, and the GC can
reclaim heap memory.

Signed-off-by: Damien George <damien@micropython.org>
pull/8677/head
Damien George 2022-05-18 09:16:33 +10:00
rodzic 90682f43af
commit b3d0f5f67c
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -126,8 +126,8 @@ def main():
)
except Exception as er:
e = er
lst[0][0] = None
lst = None
while lst:
lst[0], lst = None, lst[0] # unlink lists to free up heap
print(repr(e)[:10])
# raise a deep exception with the heap locked