summaryrefslogtreecommitdiff
path: root/src/OptionParser.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-12-08 17:52:10 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-12-08 17:52:10 +0900
commit9d7bb9d01af2c0ef1b748ac2e240b20439285fd4 (patch)
tree32032f76f7040856ee7d22370be1bd49eb507c98 /src/OptionParser.cc
parenta8641b0998af7b2a5876a77d4f18c9a78230d6b1 (diff)
Release statically allocated resources for prefs and options
Not realeasing these resources does not hurt the correctness of the program, but memory leak detection tool, such as valgrind, reports it as potential memory leak. It is better to distinguish it from the real ones.
Diffstat (limited to 'src/OptionParser.cc')
-rw-r--r--src/OptionParser.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/OptionParser.cc b/src/OptionParser.cc
index d2250374..157d74ec 100644
--- a/src/OptionParser.cc
+++ b/src/OptionParser.cc
@@ -347,4 +347,9 @@ const SharedHandle<OptionParser>& OptionParser::getInstance()
return optionParser_;
}
+void OptionParser::deleteInstance()
+{
+ optionParser_.reset();
+}
+
} // namespace aria2