lichao
2021-04-28 a6f67b4249525089fb97eb9418c7014f66c2a000
src/bh_api.cpp
@@ -8,11 +8,15 @@
namespace
{
TopicNode &ProcNode()
std::unique_ptr<TopicNode> &ProcNodePtr()
{
   static bool init = GlobalInit(BHomeShm());
   static TopicNode node(BHomeShm());
   return node;
   static std::unique_ptr<TopicNode> ptr(new TopicNode(BHomeShm()));
   return ptr;
}
TopicNode &ProcNode()
{
   return *ProcNodePtr();
}
class TmpPtr : private boost::noncopyable
@@ -320,6 +324,12 @@
   free(data);
}
int BHCleanup()
{
   ProcNodePtr().reset();
   return 0;
}
int BHGetLastError(void **msg, int *msg_len)
{
   int ec = 0;