OSDN Git Service

[dennco] refactoring
authortkawata <tkawata@users.sourceforge.jp>
Tue, 22 Jan 2013 15:08:36 +0000 (00:08 +0900)
committertkawata <tkawata@users.sourceforge.jp>
Tue, 22 Jan 2013 15:08:36 +0000 (00:08 +0900)
Source/layer1/TKContainer.cpp
Source/layer3/DNEngine.cpp

index 1f35d17..8cf1e6d 100644 (file)
@@ -22,7 +22,6 @@
 #include "TKCellCode.h"
 #include "DNStorage.h"
 #include "DNUtils.h"
-#include "dnpluginmanager.h"
 
 #include <string>
 
@@ -36,7 +35,6 @@ const std::string TKContainer::CELLCODENAME_EMPTY    = "_DNEMPTY";
 
 TKContainer::TKContainer() : mStorage(NULL), mEmptyCellClass(NULL)
 {
-    DNPluginManager::construct();
 }
 
 void TKContainer::init()
@@ -48,7 +46,6 @@ TKContainer::~TKContainer()
 {
     doDestroy();
     releaseDataStore();
-    DNPluginManager::destroy();
 }
 
 bool TKContainer::doInit()
index 9bb9895..81f70a5 100644 (file)
@@ -34,6 +34,7 @@
 #include "DNUtils.h"
 #include "TKLog.h"
 #include "DNSettings.h"
+#include "dnpluginmanager.h"
 
 #include <stdlib.h>
 #include <sstream>
@@ -44,6 +45,7 @@ DNEngine::DNEngine(const char *contentPath) :
 {
     mTimeKeeper = new DNTimeKeeper();
     mContainer = TKContainer::createContainer();
+    DNPluginManager::construct();
     mUIPath = "/ui/index.html";
 
     dnGlobal()->updateRunningStatus(DNGlobal::STOPPED);
@@ -115,6 +117,7 @@ DNEngine::~DNEngine()
         delete mTimeKeeper;
         mTimeKeeper = NULL;
     }
+    DNPluginManager::destroy();
 }