Skip to main content
NPr
Associate
July 21, 2020
Question

Dynamically add containers to swipe container at runtime

  • July 21, 2020
  • 3 replies
  • 1250 views

Hello,

ic want to add container dynamically at runtime. For example I want to create new containers an delete old once. My first try was to allocate an object on the heap an store the pointer in the class object. But if a add them to a container the chip hangs up.

Is there anyone with experience in this field?

Thank you for help.

BW NPr

3 replies

FTkal.1
Associate II
July 22, 2020

That should all be possible. The library doesn't care if your objects are on the stack or on the heap.

Stopping in the debugger after the hang will often show you have stopped at an assert() statement.

NPr
NPrAuthor
Associate
July 22, 2020

My problem was an allocation error. Because I use FreeRTOS and C++. And the new operator wasn't overloaded.

Thank you for your help!