Sign in to follow this  

stringstream memory leak

This topic is 3844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a problem with stringstream in VS2005? I thought I had a memory leak in my engine and eventually tracked it down to a stringstream. Even if I didn't use it, just declared it, it leaked memory. So I tried this:
#include <iostream>
#include <sstream>
using namespace std;

int main()
{
	while(1)
	{
		stringstream Temp;
	}

	return 0;
}

Can anyone else try it and watch the memory usage in the process view of task manager? In release it runs fine, but in debug the memory usage just keeps going up.

Share this post


Link to post
Share on other sites
What a spinout. I was considering coming here and asking about this exact same problem a few hours ago. I just did a google search and found the solution though. I guess everyones doing memory debugging this time of the year ;)

Share this post


Link to post
Share on other sites

This topic is 3844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this