I would assume the answer is always stack... but is it?? does the Arduino String do anything heap-side?
void func() {
String s1; // heap or stack?
int x; // i know this is stack
String s2 = s1 + "temp"; // s2 heap or stack, intermeadiate "temp" heap or stack?
int x1 = x + 2; // i know this is still all stack
// if these strings are on the heap, are they removed when the function exits?
}
RichardS
https://epartsconnect.com
Live realtime stock market prediction website. https://www.stocksignalslive.com my latest creation. Uses AI and machine learning.
New site featuring ESP8266 and ESP32 projects. tutorials, and news.
http://EverythingESP.com
ESP8266.com Founder and Administrator
The Mind Factory (get more from your 3D printer)
Home of the ESP8266, ESP8285, and ESP32 microcontrollers....