I have a problem with string stl from visual studio (2005, 2008 and 2010). In my program, memory grows up to 1Gb.
I create a little program that reproduce that:
When I enter severals time in the second loop, memory grows. But when I exit the loop, memory is not free. I enter again several times in the second loop, I must loop more than the previous time to see memory up.
It seems stl string manage its own memory, but when memory up to 1Gb, it becomes a problem, my program crash.
I have a problem with string stl from visual studio (2005, 2008 and 2010). In my program, memory grows up to 1Gb.
I create a little program that reproduce that:
Go back and re-edit your post to use code tags. The code you posted is unformatted and almost unreadable wihtout code tags.
You have three strings, strCtn, str, and strTemp. Which one are you referring to?
Secondly, the string is destroyed once it goes out of scope. Once the string is out of scope, anything to do with memory is dependent on the heap manager and OS, and has nothing to do with std::string.
Bookmarks