tests/extmod/btree_gc.py: Close the database to avoid a memory leak.

Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
Jeff Epler 2021-05-10 17:12:15 -05:00 committed by Damien George
parent d67f4115b4
commit 486fe71c6e
1 changed files with 3 additions and 0 deletions

View File

@ -21,3 +21,6 @@ for i in range(N):
db[b"thekey" + str(i)] = b"thelongvalue" + str(i)
print(db[b"thekey" + str(i)])
gc.collect()
# Reclaim memory allocated by the db object.
db.close()