When I run my program and stop it, I have a few memory leaks. I have identified that one is down to the fact that I am using a singleton class, and there is no way I can stop from losing that memory, is there ? (but as it is when the program terminates, it is returned to the OS anyway (is this assumption correct ?)
One of my other classes contains an std::string member. When that classes destructor is called, I am clearing the string, but as it isn't a pointer to a string I cannot just delete it, and I seem to be losing 28 bytes here as well. (Is this just a case of making the class member be a pointer to a string, and then setting it in the constructor ?)
Thanks for any input, as this program is almost complete, but I want to eliminate these 2 leaks before I will be happy to let a 3rd party test it.
Cheers,
K
One of my other classes contains an std::string member. When that classes destructor is called, I am clearing the string, but as it isn't a pointer to a string I cannot just delete it, and I seem to be losing 28 bytes here as well. (Is this just a case of making the class member be a pointer to a string, and then setting it in the constructor ?)
Thanks for any input, as this program is almost complete, but I want to eliminate these 2 leaks before I will be happy to let a 3rd party test it.
Cheers,
K