lichao
2021-03-29 5657dca25451cfb63a90a3908db0c464fe3f343d
src/msg.cpp
@@ -17,7 +17,7 @@
 */
#include "msg.h"
namespace bhome_shm {
namespace bhome_msg {
   
bool MsgMetaV1::Parse(const void *p)
@@ -59,7 +59,7 @@
}
int Msg::Release(SharedMemory &shm) const
int Msg::Release(SharedMemory &shm)
{
    if (IsCounted()) {
        const int n = count_->Dec();
@@ -69,8 +69,10 @@
    }
    // free data
    shm.Dealloc(ptr_);
    ptr_ = 0;
    shm.Delete(count_);
    count_ = 0;
    return 0;
}
} // namespace bhome_shm
} // namespace bhome_msg