From: stephan b. <sg...@us...> - 2005-01-17 21:32:37
|
Update of /cvsroot/pclasses/pclasses2/src/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17900/src/Util Modified Files: Prefs.cpp Log Message: - Added some default ctors, for upcoming s11n support. - Fixed a potential mem leak in setStore(). Index: Prefs.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Util/Prefs.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Prefs.cpp 28 Dec 2004 23:02:13 -0000 1.3 +++ Prefs.cpp 17 Jan 2005 21:32:11 -0000 1.4 @@ -7,8 +7,10 @@ namespace P { namespace Ext { - -Prefs::Section::Section(const std::string& name) { +Prefs::Section::Section(){ +} + +Prefs::Section::Section(const std::string& name) : _name(name){ } @@ -100,7 +102,7 @@ Prefs::~Prefs() { if(_store) delete _store; - clear(); + clear(); } @@ -143,11 +145,10 @@ void Prefs::setStore(PrefsStore* store) { + delete this->_store; _store = store; } } } - - |