Skip to content

How to "Delete" a SNMPTrap object when allocated with the new SNMPTrap command #43

@jamesarm97

Description

@jamesarm97

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions