ClientApplication and ServerApplication are now Singletons
This commit is contained in:
+3
-1
@@ -32,16 +32,18 @@ using namespace std;
|
||||
int main(int argc, char** argv) {
|
||||
try {
|
||||
//create the singletons
|
||||
ClientApplication::Create();
|
||||
ConfigUtility::Create();
|
||||
|
||||
//call the server's routines
|
||||
ClientApplication app;
|
||||
ClientApplication& app = ClientApplication::GetSingleton();
|
||||
app.Init(argc, argv);
|
||||
app.Proc();
|
||||
app.Quit();
|
||||
|
||||
//delete the singletons
|
||||
ConfigUtility::Delete();
|
||||
ClientApplication::Delete();
|
||||
}
|
||||
catch(exception& e) {
|
||||
cerr << "Fatal exception thrown: " << e.what() << endl;
|
||||
|
||||
Reference in New Issue
Block a user