Skip to content
Snippets Groups Projects
  • Damien George's avatar
    522ea80f
    py/gc: Add gc_sweep_all() function to run all remaining finalisers. · 522ea80f
    Damien George authored
    This patch adds the gc_sweep_all() function which does a garbage collection
    without tracing any root pointers, so frees all the memory, and most
    importantly runs any remaining finalisers.
    
    This helps primarily for soft reset: it will close any open files, any open
    sockets, and help to get the system back to a clean state upon soft reset.
    522ea80f
    History
    py/gc: Add gc_sweep_all() function to run all remaining finalisers.
    Damien George authored
    This patch adds the gc_sweep_all() function which does a garbage collection
    without tracing any root pointers, so frees all the memory, and most
    importantly runs any remaining finalisers.
    
    This helps primarily for soft reset: it will close any open files, any open
    sockets, and help to get the system back to a clean state upon soft reset.