Espeasy: [Plugins] P044_P1WifiGateway. shouldn't this be freed at some point in PLUGIN_EXIT?

Created on 14 Jan 2019  路  5Comments  路  Source: letscontrolit/ESPEasy

All 5 comments

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:

https://github.com/letscontrolit/ESPEasy/blob/0977b7e70e7771d04ea4eea11734e024b27f222f/src/_P044_P1WifiGateway.ino#L20

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wolverinevn picture wolverinevn  路  4Comments

jobst picture jobst  路  5Comments

TD-er picture TD-er  路  3Comments

uzi18 picture uzi18  路  5Comments

thehijjt picture thehijjt  路  4Comments