The lack of English language skills.
How do I run this example?
Can you explain in detail?
Explore... Chat... Share...
local test = {MOD_NAME = "test"}
function test:init()
print(node.heap())
self.text = "sdfjga.....kafndjk" # long string
print(node.heap())
end
function test:tprint()
print(node.heap())
print(self.text)
print(node.heap())
end
flashMod(test)
local test = flashMod("test")
test:init()
test:tprint()
> =node.heap()
40032
> dofile("test_func.lua")
> =node.heap()
39984
> dofile("test_func2.lua")
35504 # heap before init
35480 # heap after init
35024
sdfjga.....kafndjk # that long string
35440
>
local test = {MOD_NAME = "test"}
function test:text()
print(node.heap()) #heap usage should jump up
return "sdfjga.....kafndjk" # long string
end
function test:tprint()
print(node.heap()) #heap usage should still be low
print(self.text()) #notice the () function call
#collectgarbage() -- may need to collect here to see the heap space returned.
print(node.heap())
end
flashMod(test)
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]