199. Lambdas and Callback Management

Question.10

A developer uses std::function to store a capturing lambda:

#include <functional>

std::function<void()> callback;

void setup() {
   int data[16];
   callback = [data]() { process(data); };
}

Why is this risky in firmware?

Need Help? Refer to the Quick Guide below

Select Answer