From 9d7bb9d01af2c0ef1b748ac2e240b20439285fd4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 8 Dec 2012 17:52:10 +0900 Subject: 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. --- src/OptionParser.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/OptionParser.cc') 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::getInstance() return optionParser_; } +void OptionParser::deleteInstance() +{ + optionParser_.reset(); +} + } // namespace aria2 -- cgit