Skip to content

Commit 8a3e467

Browse files
committed
all: consolidate gc_sweep_all into mp_deinit.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 22e87fb commit 8a3e467

File tree

12 files changed

+5
-15
lines changed

12 files changed

+5
-15
lines changed

docs/develop/porting.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ The basic MicroPython firmware is implemented in the main port file, e.g ``main.
5959
pyexec_friendly_repl();
6060
6161
// Deinitialise the runtime.
62-
gc_sweep_all();
6362
mp_deinit();
6463
return 0;
6564
}

ports/esp32/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,6 @@ void mp_task(void *pvParameter) {
187187
mp_usbd_deinit();
188188
#endif
189189

190-
gc_sweep_all();
191-
192190
// Free any native code pointers that point to iRAM.
193191
esp_native_code_free_all();
194192

ports/esp8266/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void mp_reset(void) {
8888
}
8989

9090
void soft_reset(void) {
91-
gc_sweep_all();
91+
mp_deinit();
9292
mp_hal_stdout_tx_str("MPY: soft reboot\r\n");
9393
mp_hal_delay_us(10000); // allow UART to flush output
9494
mp_reset();

ports/mimxrt/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ int main(void) {
174174
machine_uart_deinit_all();
175175
machine_pwm_deinit_all();
176176
soft_timer_deinit();
177-
gc_sweep_all();
178177
mp_deinit();
179178
}
180179

ports/qemu/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ int main(int argc, char **argv) {
6262

6363
mp_printf(&mp_plat_print, "MPY: soft reboot\n");
6464

65-
gc_sweep_all();
6665
mp_deinit();
6766
}
6867
}

ports/renesas-ra/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ int main(void) {
437437

438438
MICROPY_BOARD_END_SOFT_RESET(&state);
439439

440-
gc_sweep_all();
441440
mp_deinit();
442441

443442
goto soft_reset;

ports/rp2/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ int main(int argc, char **argv) {
245245
// Hook for resetting anything right at the end of a soft reset command.
246246
MICROPY_BOARD_END_SOFT_RESET();
247247

248-
gc_sweep_all();
249248
mp_deinit();
250249
#if MICROPY_HW_ENABLE_UART_REPL
251250
setup_default_uart();

ports/samd/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ void samd_main(void) {
9898
#if MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE
9999
mp_usbd_deinit();
100100
#endif
101-
gc_sweep_all();
102101
#if MICROPY_PY_MACHINE_I2C || MICROPY_PY_MACHINE_SPI || MICROPY_PY_MACHINE_UART
103102
sercom_deinit_all();
104103
#endif

ports/stm32/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,6 @@ void stm32_main(uint32_t reset_mode) {
704704

705705
MICROPY_BOARD_END_SOFT_RESET(&state);
706706

707-
gc_sweep_all();
708707
mp_deinit();
709708

710709
goto soft_reset;

ports/unix/main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,6 @@ MP_NOINLINE int main_(int argc, char **argv) {
788788
mp_thread_deinit();
789789
#endif
790790

791-
#if defined(MICROPY_UNIX_COVERAGE)
792-
gc_sweep_all();
793-
#endif
794-
795791
mp_deinit();
796792

797793
#if MICROPY_ENABLE_GC && !defined(NDEBUG)

0 commit comments

Comments
 (0)