lichao
2021-04-30 d33a69463f1a75134d01191be0b9e1bdd757dd4b
src/bh_api.cpp
@@ -8,11 +8,15 @@
namespace
{
std::unique_ptr<TopicNode> &ProcNodePtr()
{
   static bool init = GlobalInit(BHomeShm());
   static std::unique_ptr<TopicNode> ptr(new TopicNode(BHomeShm()));
   return ptr;
}
TopicNode &ProcNode()
{
   static bool init_bind_msg_shm = MsgI::BindShm(BHomeShm());
   static TopicNode node(BHomeShm());
   return node;
   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;