@WizenedEE
Not true a simple type is such as int is on the stack, however an instance of a class eg sevro, sreial etc comes in two parts
-
the data for that instance of the class eg servo1, servo2 which are created on the heap
-
pointers to the instance data on the heap. The pointers are created on the stack.
You therfore need to free the heap data before the pointer to goes out of scope.
If not the space in the heap remaines allocated but nothing points to it.
Mark