diff options
Diffstat (limited to 'plugins/Dbx_tree/DataBase.cpp')
-rw-r--r-- | plugins/Dbx_tree/DataBase.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Dbx_tree/DataBase.cpp b/plugins/Dbx_tree/DataBase.cpp index 033e472c9d..50fe494b3c 100644 --- a/plugins/Dbx_tree/DataBase.cpp +++ b/plugins/Dbx_tree/DataBase.cpp @@ -31,12 +31,13 @@ CDataBase *gDataBase = NULL; CDataBase::CDataBase(const TCHAR *FileName)
{
- int len = _tcslen(FileName);
+ InitDbInstance(this);
+
+ size_t len = _tcslen(FileName);
m_FileName[0] = new TCHAR[len + 1];
_tcsncpy_s(m_FileName[0], len + 1, FileName, len);
m_FileName[0][len] = 0;
-
TCHAR * tmp = _tcsrchr(m_FileName[0], '.');
if (tmp)
{
@@ -62,6 +63,7 @@ CDataBase::CDataBase(const TCHAR *FileName) m_Entities = NULL;
m_Settings = NULL;
m_Events = NULL;
+
}
CDataBase::~CDataBase()
{
@@ -85,8 +87,9 @@ CDataBase::~CDataBase() delete [] (m_FileName[i]);
}
-
+ DestroyDbInstance(this);
}
+
int CDataBase::CreateDB()
{
/// TODO: create and show wizard
|