Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66015 - in branches/release: boost/flyweight libs/flyweight/doc libs/flyweight/doc/tutorial
From: joaquin_at_[hidden]
Date: 2010-10-16 07:48:44


Author: joaquin
Date: 2010-10-16 07:48:43 EDT (Sat, 16 Oct 2010)
New Revision: 66015
URL: http://svn.boost.org/trac/boost/changeset/66015

Log:
merged [66013] from trunk
Text files modified:
   branches/release/boost/flyweight/refcounted.hpp | 18 ++++--------------
   branches/release/libs/flyweight/doc/release_notes.html | 7 +++++--
   branches/release/libs/flyweight/doc/tutorial/technical.html | 16 +++++++++++-----
   3 files changed, 20 insertions(+), 21 deletions(-)

Modified: branches/release/boost/flyweight/refcounted.hpp
==============================================================================
--- branches/release/boost/flyweight/refcounted.hpp (original)
+++ branches/release/boost/flyweight/refcounted.hpp 2010-10-16 07:48:43 EDT (Sat, 16 Oct 2010)
@@ -1,4 +1,4 @@
-/* Copyright 2006-2009 Joaquin M Lopez Munoz.
+/* Copyright 2006-2010 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,6 @@
 
 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
 #include <algorithm>
-#include <boost/assert.hpp>
 #include <boost/detail/atomic_count.hpp>
 #include <boost/detail/workaround.hpp>
 #include <boost/flyweight/refcounted_fwd.hpp>
@@ -36,7 +35,9 @@
  * Here is where the deleter count comes into play. This count is
  * incremented when the reference count changes from 0 to 1, and decremented
  * when a thread is about to check a value for erasure; it can be seen that a
- * value is effectively erasable only when the deleter count goes down to 0.
+ * value is effectively erasable only when the deleter count goes down to 0
+ * (unless there are dangling references due to abnormal program termination,
+ * for instance if std::exit is called).
  */
 
 namespace boost{
@@ -57,17 +58,6 @@
     x(r.x),ref(0),del_ref(0)
   {}
 
- ~refcounted_value()
- {
- /* count()!=0 most likely indicates that the flyweight factory
- * has been destructed before some of the flyweight objects using
- * it. Check for static initialization order problems with this
- * flyweight type.
- */
-
- BOOST_ASSERT(count()==0);
- }
-
   refcounted_value& operator=(const refcounted_value& r)
   {
     x=r.x;

Modified: branches/release/libs/flyweight/doc/release_notes.html
==============================================================================
--- branches/release/libs/flyweight/doc/release_notes.html (original)
+++ branches/release/libs/flyweight/doc/release_notes.html 2010-10-16 07:48:43 EDT (Sat, 16 Oct 2010)
@@ -38,7 +38,7 @@
   <li>Boost 1.38 release</li>
 </ul>
 
-<h2><a name="boost_1_44">Boost 1.44 release</a></h2>
+<h2><a name="boost_1_45">Boost 1.45 release</a></h2>
 
 <p>
 <ul>
@@ -47,6 +47,9 @@
     in Win32 platforms related to a Boost.Interprocess issue described at
     ticket #4606.
   </li>
+ <li>Removed an internal assertion incompatible with program termination
+ via <code>std::exit</code>.
+ </li>
 </ul>
 </p>
 
@@ -102,7 +105,7 @@
 
 <br>
 
-<p>Revised October 9th 2010</p>
+<p>Revised October 16th 2010</p>
 
 <p>&copy; Copyright 2006-2010 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
 Distributed under the Boost Software

Modified: branches/release/libs/flyweight/doc/tutorial/technical.html
==============================================================================
--- branches/release/libs/flyweight/doc/tutorial/technical.html (original)
+++ branches/release/libs/flyweight/doc/tutorial/technical.html 2010-10-16 07:48:43 EDT (Sat, 16 Oct 2010)
@@ -130,12 +130,18 @@
 </pre></blockquote>
 
 <p>
-In some environments, the program above fails at termination time with something
-like the following:
+In some environments, the program above fails when exiting. For instance, if run
+from Microsoft Visual C++ environment in debug mode, a breakpoint is triggered
+at termination time and the debug output window shows a message along the following:
 </p>
 
 <blockquote><pre>
-Assertion failed: count()==0, file c:\boost\flyweight\refcounted.hpp, line 68
+HEAP[test.exe]: HEAP: Free Heap block 3a6488 modified at 3a6650 after it was
+freed
+Windows has triggered a breakpoint in test.exe.
+This may be due to a corruption of the heap, and indicates a bug in test.exe
+or any of the DLLs it has loaded.
+The output window may have more diagnostic information
 </pre></blockquote>
 
 <p>
@@ -180,9 +186,9 @@
 
 <br>
 
-<p>Revised June 22nd 2009</p>
+<p>Revised Octber 16th 2010</p>
 
-<p>&copy; Copyright 2006-2009 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
+<p>&copy; Copyright 2006-2010 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
 Distributed under the Boost Software
 License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">
 LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk