Open jamesarm97 opened 1 year ago
I am getting past the exception, but what I am seeing is only part of the memory is being freed when I delete the trap. So the memory leak will continue for every new trap created / freed until the memory is exhausted.
I have a trap pointer declared with
trap = new SNMPTrap("public", SNMP_VERSION_2C);
and after sending the trap I want to delete the object so it doesn't take up memory and I will be calling the new command every time I want to send one with different information. I tried just using 'delete trap;' but that is causing a stack corruption or something and the ESP32 is restarting. Should this be feasible or am I looking at it wrong?