Jump to content
  • Advertisement
Sign in to follow this  
wasd

stringstream memory leak

This topic is 4041 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
Advertisement
Well, it would appear you aren't actually crazy and this is a documented bug that was fixed with Visual Studio 2005 Service Pack 1. Get it here! Hope that helps.

edit: it appears I don't have SP 1 yet either. Better get on that.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!