Hello.
I use wifi.ping wifi.ping with setInterval under v1.96 and NodeMCU, it have memory leak in case if I use callback function and function wifi.ping always return undefined. See code and result below.
How it's may be solve? I need to have result of ping: successful or fail, without check of callback argument, in this case memory leak will not present.
var wifi = require("Wifi");
wifi.stopAP();
function onInit() {
wifi.connect("ssid", {password: "password"});
setInterval(function(){
console.log(wifi.ping("192.168.2.1", function(b){
//console.log(b);
}));
console.log(process.memory().free);
}, 5000);
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hello.
I use wifi.ping wifi.ping with setInterval under v1.96 and NodeMCU, it have memory leak in case if I use callback function and function wifi.ping always return undefined. See code and result below.
How it's may be solve? I need to have result of ping: successful or fail, without check of callback argument, in this case memory leak will not present.
result: