Can I use alloc() to load a whole class into memory? (I guess I mean a whole object based on a class), and then use free() afterwards?
I’ve written a project based on a dozen or more library’s I’ve written. I’ve estimated the memory footprint of some of the larger objects to be about 500 bytes (I do quite a bit of string manipulation which seems to take up a lot of space). Several of those objects are used once and once only during the ‘setup()’ part of the sketch. My (limited) understanding is that this memory once allocated stays there permanently, even if the object doesn’t get used again, is this correct?
My application is running (very) low on memory, is there a way of freeing up this memory after the object has done what it’s got to do?
Also, is there a tutorial on memory management directed specifically to the arduino? I’ve tried to read-up on this subject, but a lot of the general C and c++ stuff I read is often different from what I read on this forum.
Mike