How to store a string in an object and retrieve it safely later?
void Bank::addPreset(const char* presetName, String presetData, char presetLocaton)
{
  Preset preset(presetName, presetData);

  switch (presetLocaton)
  {
    case PRESET_LOCATION_1:
      _A = &amp;preset; break;
    case PRESET_LOCATION_2:
      _B = &amp;preset; break;
    case PRESET_LOCATION_3:
      _C = &amp;preset; break;
    case PRESET_LOCATION_4:
      _D = &amp;preset; break;
  }
}


I can't see how this is going to work because you are storing somewhere outside a function a pointer to a local variable inside the function. As soon as addPreset exits the variable preset will go out of scope, and a pointer to it will be undefined.



You should probably do a new to make a new instance of Preset which it is then valid to store outside the scope of the function.