Closed vidalouiswang closed 3 years ago
Hi, this seems to be a bit complex for someone to get into it. Can you please provide a Minimal, Complete, and Verifiable example?
Hi, this seems to be a bit complex for someone to get into it. Can you please provide a Minimal, Complete, and Verifiable example?
Haha, I found an error in the process of streamlining the code. After the correction, the memory is no longer leaking. I had edited the code and thank you for your reply.
@vidalouiswang Good to hear that 👍. I think it is usually the case that the leak is likely in Lua code. This is why a minimal example is needed.
Expected behavior
Memory won't leak.
Actual behavior
Memory leak after client requested.
Test code
NodeMCU startup banner
NodeMCU 3.0.0.0 branch: release commit: d4ae3c364bd8ae3ded8b77d35745b7f07879f5f9 release: 3.0.0-release_20210201 +1 release DTS: 202105102018 SSL: false build type: float LFS: 0x40000 bytes total capacity modules: adc,coap,crypto,encoder,file,gpio,http,i2c,mdns,net,node,pwm,rtcfifo,rtcmem,rtctime,sjson,sntp,spi,tmr,uart,websocket,wifi build 2021-06-01 00:56 powered by Lua 5.3.5 on SDK 3.0.1-dev(fce080e)
Hardware
I'm using a typical NodeMCU 4MB dev board. I'm sure resources have been released after used, but every time after the client refreshed the page(to refetch the file "index.html") memory will be reduced by 1KB, until all memory gone the NodeMCU will be reboot.