Call gc_sweep_all on soft-reset.

* Make sure to collect open lwip sockets otherwise it runs out of memory.
* This should be okay to add in general but will only enable for LWIP for now.
This commit is contained in:
iabdalkader 2021-02-10 22:58:07 +02:00
parent 1cf5191c9c
commit 107bbed9f1

View File

@ -745,6 +745,9 @@ soft_reset:
#ifdef IMLIB_ENABLE_DMA2D
imlib_draw_row_deinit_all();
#endif
#if MICROPY_PY_LWIP
gc_sweep_all();
#endif
first_soft_reset = false;
goto soft_reset;
}