Closed
Description
test code:
void loop() {
USE_SERIAL.printf("RAM: %d\n", ESP.getFreeHeap());
// wait for WiFi connection
if((WiFi.status() == WL_CONNECTED)) {
WiFiClient * _tcp = new WiFiClient();
_tcp->connect("192.168.1.12", 80);
_tcp->stop();
_tcp->~WiFiClient(); //does not help but shut abort any connection and free all
}
delay(100);
}
return:
RAM: 41312
RAM: 41312
RAM: 41048
RAM: 40816
RAM: 40584
RAM: 40352
RAM: 40104
RAM: 39872
RAM: 39640
RAM: 39408
RAM: 39176
RAM: 38944
RAM: 38712
RAM: 38480
RAM: 38248
RAM: 38016
RAM: 37784