dir_readers' memory now freed by boost::scoped_ptr
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4357 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
872e35f0e7
commit
a2177c9b8b
2 changed files with 13 additions and 25 deletions
|
@ -16,13 +16,15 @@
|
|||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include "boost/scoped_ptr.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern FILE *g_output;
|
||||
|
||||
void Plugins::FindCommands(const string &path, bool displayInfo)
|
||||
{
|
||||
dir_reader *dr = new_dir_reader();
|
||||
boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
|
||||
dr->read(path);
|
||||
|
||||
dir_reader::iterator files_itr = dr->files().begin();
|
||||
|
@ -35,8 +37,6 @@ void Plugins::FindCommands(const string &path, bool displayInfo)
|
|||
const string plugin = path + PLATFORM_PATH_SEPARATOR_C + *files_itr;
|
||||
GetExports(plugin, displayInfo);
|
||||
}
|
||||
|
||||
delete dr;
|
||||
}
|
||||
|
||||
void Plugins::GetExports(const string &pathToDll, bool displayInfo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue