- more memory cleanup

This commit is contained in:
Mark Vejvoda
2010-09-07 18:28:09 +00:00
parent 9817e8a860
commit 63cf199322
2 changed files with 22 additions and 9 deletions

View File

@@ -146,9 +146,12 @@ public:
}
std::string getString() const {
std::ostringstream streamOut(std::ostringstream::out);
streamOut << "x [" << x << "] y [" << y << "]";
return streamOut.str();
std::ostringstream streamOut;
streamOut << "x [" << x;
streamOut << "] y [" << y << "]";
std::string result = streamOut.str();
streamOut.str(std::string());
return result;
}
};
@@ -330,9 +333,13 @@ public:
}
std::string getString() const {
std::ostringstream streamOut(std::ostringstream::out);
streamOut << "x [" << x << "] y [" << y << "] z [" << z << "]";
return streamOut.str();
std::ostringstream streamOut;
streamOut << "x [" << x;
streamOut << "] y [" << y;
streamOut << "] z [" << z << "]";
std::string result = streamOut.str();
streamOut.str(std::string());
return result;
}
};
@@ -473,9 +480,14 @@ public:
}
std::string getString() const {
std::ostringstream streamOut(std::ostringstream::out);
streamOut << "x [" << x << "] y [" << y << "] z [" << z << "] w [" << w << "]";
return streamOut.str();
std::ostringstream streamOut;
streamOut << "x [" << x;
streamOut << "] y [" << y;
streamOut << "] z [" << z;
streamOut << "] w [" << w << "]";
std::string result = streamOut.str();
streamOut.str(std::string());
return result;
}
};