The object is being deleted by using delete on a pointer to the object. I do not use delete &object;. The 2 char arrays are initialized at the time of attempted deletion.
Am I deleting the char arrays incorrectly? Or is there something going wrong in some other part of my code?
I made a function specifically for that purpose. I had a feeling that the improperly initialized chars were screwing with the other variables in the class due to buffer overflow, so I made that. Want that function as well?
Also, did this happen while debugging or running a debug version of the EXE? If yes, then note that allocation functions in the debug library have additional checking of the state. If you allocate 10 bytes and you write 11, you might not have noticed it at the moment, but the second you do delete[] the debug library checks for the integrity of the RAM allocated and notices the extra byte, notifying you of the problem. So, it could be an allocation problem, but can also be that you are not allocating enough.
The cout was simply to see where the function was called, since I don't know how to get to the call stack. Should I be allocating to the length of 'value' + 1, for the null character?
And by the way, I'm not running the debug version. I'm running under Release, since VC++ often gave me assertion errors.