I have a very text heavy project.
Currently I have the text stored as JSON files on an SD. The user reads through the spells (it's for D&D) one at a time on a screen. I only need to hold 1 spell, and then free up the memory from that object when it's time for the new one. I incorrectly thought that it would free up the memory for the object when it's "orphaned."
void parseSpellJson(int spellNum) {
File spellJSON = SD.open(fileNames[spellNum]);
const size_t capacity = JSON_OBJECT_SIZE(12) + 1240;
DynamicJsonDocument root(capacity);
deserializeJson(root,spellJSON);
Spell* newSpell = new Spell(root["name"], root["casting_time"], root["components"], root["duration"], root["level"], root["range"], root["ritual"], root["school"], root["page1"], root["page2"], root["page3"], root["page4"]);
tome.push(newSpell);
}