Skip to content

High Heap memory consumption ? Is it normal ? #18

Description

@mathieucarbou

@rwmingis : I am following with interest issue #17: I am using your library which is pretty cool. I found that when I activate it in my project, the heap memory usage bumps a lot (I don't know the reason). I am using Event_KeyPress and Event_LongKeyPress with no special configuration.

Should I also disable some events like shown in issue #17 to get some memory back ?

Here is the heap consumption of my ESP, when the button option is activated, I am creating a button like this:

  button = new InterruptButton(pin, LOW);
  button->setLongPressInterval(8000);
  button->bind(events::Event_KeyPress, [this]()
               { _callback(ButtonConfig.getPressAction()); });
  button->bind(events::Event_LongKeyPress, [this]()
               { _callback(ButtonConfig.getLongPressAction()); });
  InterruptButton::setMode(Mode_Asynchronous);

image

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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