提交 b7a00e30 编写于 作者: F FluorineDog 提交者: yefu.chen

Fix memory leak

Signed-off-by: NFluorineDog <guilin.gou@zilliz.com>
上级 24eebc5c
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <iostream> #include <iostream>
#include "EasyAssert.h" #include "EasyAssert.h"
#define BOOST_STACKTRACE_USE_BACKTRACE // #define BOOST_STACKTRACE_USE_BACKTRACE
#include <boost/stacktrace.hpp> #include <boost/stacktrace.hpp>
#include <sstream> #include <sstream>
...@@ -19,10 +19,14 @@ namespace milvus::impl { ...@@ -19,10 +19,14 @@ namespace milvus::impl {
std::string std::string
EasyStackTrace() { EasyStackTrace() {
std::string output;
#ifdef BOOST_STACKTRACE_USE_BACKTRACE
auto stack_info = boost::stacktrace::stacktrace(); auto stack_info = boost::stacktrace::stacktrace();
std::ostringstream ss; std::ostringstream ss;
ss << stack_info; ss << stack_info;
return ss.str(); output = std::string(ss.str());
#endif
return output;
} }
void void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册