Why a pointer to a class take less memory SRAM than a "classic" variable

Because the instances will be created at run time. No memory is allocated for the objects… so the compiler does not report it, but you will still need the memory at run time.

(It’s C++ so don’t expect to find that in the arduino doc. They focus mainly on their addd on functions and libraries)

1 Like