See link:
And maybe change this to new and delete?
As we speak, I am updating this plugin to use the Plugin_task_data and indeed it needs to free the data.
I was even thinking about using a std::vector for this one.
I was even thinking about using a std::vector for this one.
Yes if that would be possible, I would go for that as well.
And maybe use an enum (class) for this:
EDIT you can even do it like this:
enum (class) State : byte {
Disabled,
...
};
I did change it to be a String, since there were already functions implemented to do just what was already available in the String class.
See: https://github.com/letscontrolit/ESPEasy/pull/2235/commits/ef5f5199a4990afb3e152329f8e0c99be581c117
The code for the P044_P1WifiGateway is reverted to some state before my fixes of this issue.
So I added a quick fix for this memory leak.
Later we will have a proper look at the code to see what was causing the issues with the ser2net plugin.
Anyway this issue is now fixed, so I will close it.