I have a ostringstream and I ues it, but than when I am done using should I delete it? if so how?
I have a ostringstream and I ues it, but than when I am done using should I delete it? if so how?
If you are done using it, let it go out of scope like any other variable and it will be cleaned up automatically. There is no need to delete it any more than you need to delete a variable of any other type.
If you use new to create it, you would of course have to delete it, but you probably don't need to create an ostringstream with new.
Ok I'v been wondering that becuase I use it in a function and the function is called over and over and stuff, but ok sounds good.