Explorar o código

Fix for big stupid bbFunction ref counting bug.

Mark Sibly %!s(int64=7) %!d(string=hai) anos
pai
achega
47b88e79ae
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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{
 	struct Rep{
 		
 		
 #ifdef BB_THREADS
 #ifdef BB_THREADS
-		std::atomic_int refs;
+		std::atomic_int refs{0};
 #else
 #else
-		int refs;
+		int refs{0};
 #endif
 #endif
 
 
 		virtual ~Rep(){
 		virtual ~Rep(){