From 2197cf91e7a3bd5941327ba630a42946b88f069e Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期五, 09 四月 2021 14:15:41 +0800
Subject: [PATCH] join pub/sub to node; refactor.

---
 src/msg.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/msg.cpp b/src/msg.cpp
index c353d84..06b817e 100644
--- a/src/msg.cpp
+++ b/src/msg.cpp
@@ -78,6 +78,14 @@
 	return true;
 }
 
+bool MsgI::EnableRefCount(SharedMemory &shm)
+{
+	if (!IsCounted()) {
+		count_ = shm.New<RefCount>();
+	}
+	return IsCounted();
+}
+
 int MsgI::Release(SharedMemory &shm)
 {
 	if (IsCounted()) {

--
Gitblit v1.8.0