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>
This commit is contained in:
Damien George 2022-05-18 09:16:33 +10:00
parent 90682f43af
commit b3d0f5f67c
1 changed files with 2 additions and 2 deletions

View File

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