gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog libbase/ref_counted.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/ref_counted.h
Date: Sat, 07 Jul 2007 03:49:52 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/07/07 03:49:52

Modified files:
        .              : ChangeLog 
        libbase        : ref_counted.h 

Log message:
                * libbase/ref_counted.h: use boost's atomic_count
                  for the reference counter. Should be safer.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3668&r2=1.3669
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/ref_counted.h?cvsroot=gnash&r1=1.11&r2=1.12

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3668
retrieving revision 1.3669
diff -u -b -r1.3668 -r1.3669
--- ChangeLog   7 Jul 2007 03:37:29 -0000       1.3668
+++ ChangeLog   7 Jul 2007 03:49:51 -0000       1.3669
@@ -1,5 +1,10 @@
 2007-07-06 Sandro Santilli <address@hidden>
 
+       * libbase/ref_counted.h: use boost's atomic_count
+         for the reference counter. Should be safer.
+
+2007-07-06 Sandro Santilli <address@hidden>
+
        * server/vm/ASHandlers.cpp (CommonGetUrl): use
          sprite_instance::loadMovie for target loads.
          Fixes bug #20001

Index: libbase/ref_counted.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/ref_counted.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- libbase/ref_counted.h       1 Jul 2007 17:34:59 -0000       1.11
+++ libbase/ref_counted.h       7 Jul 2007 03:49:51 -0000       1.12
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: ref_counted.h,v 1.11 2007/07/01 17:34:59 strk Exp $ */
+/* $Id: ref_counted.h,v 1.12 2007/07/07 03:49:51 strk Exp $ */
 
 #ifndef GNASH_REF_COUNTED_H
 #define GNASH_REF_COUNTED_H
@@ -41,10 +41,13 @@
 
 private:
 
-       typedef long Counter;
-       // boost atomic_counter is thread-safe, but doesn't
-       // provide a copy constructor.
-       //typedef mutable boost::detail::atomic_count Counter;
+       // We use an atomic counter to make ref-counting 
+       // thread-safe. The drop_ref() method must be
+       // carefully designed for this to be effective
+       // (decrement & check in a single statement)
+       //
+       typedef boost::detail::atomic_count Counter;
+       // typedef long Counter;
 
        mutable Counter m_ref_count;
        




reply via email to

[Prev in Thread] Current Thread [Next in Thread]