diff --git a/Console/main.cpp b/Console/main.cpp index 9842eaf..0073fd1 100644 --- a/Console/main.cpp +++ b/Console/main.cpp @@ -1,7 +1,8 @@ #include #include -#include #include +#include +#include #include "Console.h" @@ -25,11 +26,11 @@ int main(int argc, char* argv[]) Util::InitLogger("frelayConsole.log", "frelayConsole"); qInstallMessageHandler(Util::ConsoleMsgHander); - auto* core = new ClientCore(); - auto* helper = new ConsoleHelper(); + auto core = std::make_shared(); + auto helper = std::make_shared(); helper->SetIpPort(argv[1], QString("%1").arg(argv[2]).toInt()); - helper->RunWorker(core); + helper->RunWorker(core.get()); helper->Connect(); return app.exec();