If you're using the customizable and optional "settings" within the config.json, every time Homie.isConfigured() is called, some heap memory is lost to a strdup()'ed variable.
This PR adds a new function ffree() to every template, it only contains actual code for the const char*-Setting.
I have several "custom" settings in the config.json and I'm calling Homie.isConfigured() frequently. I noticed that the free heap space kept decreasing, which led to a forced reboot after a while.
If you're using the customizable and optional "settings" within the config.json, every time
Homie.isConfigured()
is called, some heap memory is lost to astrdup()
'ed variable.The variable is created via a
strdup()
at Config.cpp,141 and saved at HomieSetting.cpp,66.This PR adds a new function
ffree()
to every template, it only contains actual code for theconst char*
-Setting.I have several "custom" settings in the config.json and I'm calling
Homie.isConfigured()
frequently. I noticed that the free heap space kept decreasing, which led to a forced reboot after a while.