浏览代码

Fix for big stupid bbFunction ref counting bug.

Mark Sibly 7 年之前
父节点
当前提交
47b88e79ae
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/monkey/native/bbfunction.h

+ 2 - 2
modules/monkey/native/bbfunction.h

@@ -30,9 +30,9 @@ template<class R,class...A> struct bbFunction<R(A...)>{
 	struct Rep{
 		
 #ifdef BB_THREADS
-		std::atomic_int refs;
+		std::atomic_int refs{0};
 #else
-		int refs;
+		int refs{0};
 #endif
 
 		virtual ~Rep(){