• There may be a misunderstanding. I want to free memory.
    Starting with this:

    var g = require("ILI9341").connect(SPI2,C6,C7,C8,function(){g.clear();});
    

    Process.memory() returns usage 329
    Dump shows var g = { ..... digitalWrite(C6,1....
    Result is as expected

    g = "";
    

    Process.memory() returns usage 331
    dump shows var g = ""; digitalWrite(C6,1.....
    I expected less memory usage

    Modules.removeAllCached(); 
    

    Process.memory() returns usage 330
    dump shows var g = ""; digitalWrite(C6,1.....
    I expected less memory usage
    Tried to do this:

    var b = "ILI9341";
    g = require(b).connect(....
    

    returns unable to read file no path
    Process.memory() still returns usage 332
    There is no object, no module, so how do I get rid of memory consumption ?

About

Avatar for JumJum @JumJum started