From 107bbed9f16ae5e8832f1233b3ee73c7af26fce8 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 10 Feb 2021 22:58:07 +0200 Subject: [PATCH] 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. --- src/omv/ports/stm32/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/omv/ports/stm32/main.c b/src/omv/ports/stm32/main.c index 0563c4d7a..a436671c2 100644 --- a/src/omv/ports/stm32/main.c +++ b/src/omv/ports/stm32/main.c @@ -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; }