diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-03 18:27:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-03 18:27:17 +0000 |
commit | 8cb2a99e08a3f8fadc3b39f00228efa7d2b20050 (patch) | |
tree | 65576462073546d462936d7ad8a2aa3e4e6147d8 /plugins/Dbx_tree | |
parent | d2da1f079fc61195437007882296184714d2fe54 (diff) |
database cache migration, phase 1
git-svn-id: http://svn.miranda-ng.org/main/trunk@1772 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_tree')
-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
|