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:
parent
90682f43af
commit
b3d0f5f67c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue