Memory leak



  • Hello,

    If you load a module (that contains a class inside) , the memory is not freed. Here is an example:

    PYB: soft reboot
    MicroPython v1.8.6-412-gf55ba50 on 2017-01-28; LoPy with ESP32
    Type "help()" for more information.
    import gc,sys
    gc.mem_free()
    58432
    import onewire
    onewire loaded
    gc.mem_free()
    54128
    gc.collect()
    gc.mem_free()
    54320 <<<< 4k still out
    del sys.modules['onewire']
    gc.collect()
    gc.mem_free()
    54368
    import onewire
    onewire loaded
    gc.mem_free()
    50800 <<<< another 4k out
    import onewire
    gc.mem_free()
    50640
    del sys.modules['onewire']
    gc.collect()
    gc.mem_free()
    51088
    import onewire
    onewire loaded
    gc.mem_free()
    47520 <<<< another 4k out



  • Thank you. Looking forward for some workaround on this .



  • @Colateral

    please reformat your post
    look here for format guide
    http://commonmark.org/help/

    but your observation about eating memory should be reviewed by @daniel


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.