diff options
author | randomdan <randomdan@localhost> | 2012-01-04 18:21:01 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2012-01-04 18:21:01 +0000 |
commit | 7f822090b6b1d01bfffb8591e5a49793bf83627f (patch) | |
tree | d5127d1886d8eeb1978eaa9d43a515ad03e7d1a9 /project2/cgi | |
parent | Allowing specification of output encoding (diff) | |
download | project2-7f822090b6b1d01bfffb8591e5a49793bf83627f.tar.bz2 project2-7f822090b6b1d01bfffb8591e5a49793bf83627f.tar.xz project2-7f822090b6b1d01bfffb8591e5a49793bf83627f.zip |
Address memory leaks that have snook in over time
Diffstat (limited to 'project2/cgi')
-rw-r--r-- | project2/cgi/testCgi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/project2/cgi/testCgi.cpp b/project2/cgi/testCgi.cpp index 855e59b..624f2d7 100644 --- a/project2/cgi/testCgi.cpp +++ b/project2/cgi/testCgi.cpp @@ -7,7 +7,7 @@ #include "../files/optionsSource.h" #define TESTOPT(name, def, desc) \ - (name, Options::value(optStore.insert(OptStore::value_type(name, new std::string())).first->second, def), desc) + (name, Options::value(optStore.insert(OptStore::value_type(name, StrPtr(new std::string()))).first->second.get(), def), desc) class TestInput : public cgicc::CgiInput { public: class TestConfigConsumer : public ConfigConsumer { @@ -24,7 +24,7 @@ class TestInput : public cgicc::CgiInput { const Options * o; }; - typedef std::string * StrPtr; + typedef boost::shared_ptr<std::string> StrPtr; typedef std::map<std::string, StrPtr> OptStore; OptStore optStore; TestInput() : |