arduino-managed-serial-device icon indicating copy to clipboard operation
arduino-managed-serial-device copied to clipboard

Statically allocate callback functions

Open coddingtonbear opened this issue 7 years ago • 0 comments

Currently this library relies on use of std::functional which itself creates function objects on the heap. This isn't ideal for use on constrained memory devices due to fragmentation issues, but is extremely handy for defining callback functions. My C++ skills aren't strong enough at the moment to handle this, but it's apparently possible for functions to be statically allocated to avoid this problem.

coddingtonbear avatar Nov 03 '18 18:11 coddingtonbear