提交 cfbb4c48 编写于 作者: Q qiaolongfei

use unique_ptr

上级 95f20b94
...@@ -37,9 +37,10 @@ int main(int argc, char** argv) { ...@@ -37,9 +37,10 @@ int main(int argc, char** argv) {
initMain(argc, argv); initMain(argc, argv);
initPython(argc, argv); initPython(argc, argv);
std::unique_ptr<PServerUtil> pServerPtr(nullptr);
if (FLAGS_start_pserver) { if (FLAGS_start_pserver) {
PServerUtil* pServerUtil = paddle::PServerUtil::createWithGflags(); pServerPtr.reset(paddle::PServerUtil::createWithGflags());
pServerUtil->start(); pServerPtr->start();
} }
Trainer trainer; Trainer trainer;
auto config = TrainerConfigHelper::createFromFlags(); auto config = TrainerConfigHelper::createFromFlags();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册