-
Notifications
You must be signed in to change notification settings - Fork 491
How to release memories in loop() if I use Firebase only in setup() #251
Comments
Have someone help me? 🥇 |
Seems similar to #252 |
Sorry for the late follow-up: I wonder if this was fixed with esp8266/Arduino@bf5a0f2 ? |
Using SDK2.4.2 and checking the free heap on each all, the memory come down to a stable value, however, is it possible to free it completely as requested by @tackelua ? it is actually related to #28 which merged from #375. I was also attempt to end the connection by calling end() but doesn't seem to have any impact, any idea how to do it? |
Just found a working workaround, which i don't really like: add a new function to end the connection by setting the httpclient with timeout to 1 and do a empty sendrequest which will force the connection to fail, it will release the heap, this solution. However, only works with Arduino 2.4.2. Try that on 2.5.0, it doesn't work. There is some setting in the library stopping the httpclient to free the resource. As i try a normal httpclient request, when it finished, I will free the heap. @proppy , do you know what it is let httpclient hold on to the connection/heap? |
Uh oh!
There was an error while loading. Please reload this page.
Example, I have a program with below struct:
When I check free memory by function ESP.getFreeHeap():
#check 1: Free 34504
#check 2: Free 15816
#check 3: Free 16040
It's waste memory in loop().
How to delete Firebase or release memories?
The text was updated successfully, but these errors were encountered: