Index: library/doc/html/memory_management.html
===================================================================
--- library/doc/html/memory_management.html (revision 641)
+++ library/doc/html/memory_management.html (revision 651)
@@ -1,12 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
 <title>mixpp: Memory Management in BDM</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.1 -->
+<link href="tabs.css" rel="stylesheet" type="text/css">
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.9 -->
 <script type="text/javascript">
 <!--
@@ -63,8 +60,5 @@
 </div>
 <div class="contents">
-
-
-<h1><a class="anchor" id="memory_management">Memory Management in BDM </a></h1><p>C++ memory management is notoriously flexible, allowing a wide range of efficient and dangerous techniques. BDM uses conventions which allow high implementation efficiency (not absolutely maximal, but within a measurement error of the most efficient way) while substantially reducing the danger of memory errors. These conventions are described below.</p>
-<h2><a class="anchor" id="Constructors">
+<h1><a class="anchor" name="memory_management">Memory Management in BDM </a></h1>C++ memory management is notoriously flexible, allowing a wide range of efficient and dangerous techniques. BDM uses conventions which allow high implementation efficiency (not absolutely maximal, but within a measurement error of the most efficient way) while substantially reducing the danger of memory errors. These conventions are described below.<h2><a class="anchor" name="Constructors">
 Constructors</a></h2>
 <ul>
@@ -74,18 +68,17 @@
 <li>Each constructor must initialize all fields of the constructed object, to prevent unpredictable behavior.</li>
 </ul>
-<p>One consequence of the points above is the case when a default constructor doesn't have the data with which to initialize a new object - in that case it can simply call the default constructors of all its object fields (and base classes), but must explicitly initialize all numeric fields and raw pointers to 0. Such an object isn't valid as constructed and must have some additional initialization methods (typically from_settings, for reading its configured state), but it can at least be destroyed.</p>
-<h2><a class="anchor" id="Exceptions">
+One consequence of the points above is the case when a default constructor doesn't have the data with which to initialize a new object - in that case it can simply call the default constructors of all its object fields (and base classes), but must explicitly initialize all numeric fields and raw pointers to 0. Such an object isn't valid as constructed and must have some additional initialization methods (typically from_settings, for reading its configured state), but it can at least be destroyed.<h2><a class="anchor" name="Exceptions">
 Exceptions</a></h2>
-<p>BDM uses exceptions to signal runtime and some logic errors. The library aims to provide the minimal exception safety (that is, throwing an exception doesn't crash and doesn't leak any resources) for all thrown exceptions <b>except</b> memory errors - when a program using BDM exhausts memory, it should be terminated as soon as possible (and in most cases it has probably already terminated by itself). Specific exceptions may provide stronger guarantees, as documented for specific cases. All exceptions thrown out of the library are descendants of std::exception. Since they're organized into a class hierarchy, they should be caught by reference:</p>
+BDM uses exceptions to signal runtime and some logic errors. The library aims to provide the minimal exception safety (that is, throwing an exception doesn't crash and doesn't leak any resources) for all thrown exceptions <b>except</b> memory errors - when a program using BDM exhausts memory, it should be terminated as soon as possible (and in most cases it has probably already terminated by itself). Specific exceptions may provide stronger guarantees, as documented for specific cases. All exceptions thrown out of the library are descendants of std::exception. Since they're organized into a class hierarchy, they should be caught by reference:<p>
 <div class="fragment"><pre class="fragment"><span class="keywordflow">try</span> {
         mpdf* mtmp = UI::build&lt;mpdf&gt; (_Sources, i);
         Sources (i) = mtmp;
 } <span class="keywordflow">catch</span> (UIException &amp;exc) {
-</pre></div><p>This saves one call to copy constructor and prevents slicing.</p>
-<h2><a class="anchor" id="Pointers">
+</pre></div><p>
+This saves one call to copy constructor and prevents slicing.<h2><a class="anchor" name="Pointers">
 Pointers</a></h2>
-<p>Pointers are used extensively (for efficiency), but usage of raw pointers should be minimized.</p>
-<p>Objects allocated by operator new should be assigned to a smart pointer instance immediately upon their construction, so that they can be automatically deleted after use. BDM implements its own reference-counted smart pointer template, <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">bdm::shared_ptr</a>, whose interface and semantics are close to the proposed standard std::tr1:shared_ptr (which is planned to replace <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">bdm::shared_ptr</a> once it becomes widely available). Note that objects allocated on the stack <b>must</b> <b>not</b> have their addresses passed to shared_ptr - that is a bug leading to intermittent runtime errors.</p>
-<p>Non-null heap pointers may also be kept in instances of object_ptr, which is convertible to (and from) shared_ptr. The SHAREDPTR macro (or SHAREDPTR2, for templated types) defines standartized names for these instances, simplifying library usage:</p>
+Pointers are used extensively (for efficiency), but usage of raw pointers should be minimized.<p>
+Objects allocated by operator new should be assigned to a smart pointer instance immediately upon their construction, so that they can be automatically deleted after use. BDM implements its own reference-counted smart pointer template, <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">bdm::shared_ptr</a>, whose interface and semantics are close to the proposed standard std::tr1:shared_ptr (which is planned to replace <a class="el" href="classbdm_1_1shared__ptr.html" title="A naive implementation of roughly a subset of the std::tr1::shared_ptr spec.">bdm::shared_ptr</a> once it becomes widely available). Note that objects allocated on the stack <b>must</b> <b>not</b> have their addresses passed to shared_ptr - that is a bug leading to intermittent runtime errors.<p>
+Non-null heap pointers may also be kept in instances of object_ptr, which is convertible to (and from) shared_ptr. The SHAREDPTR macro (or SHAREDPTR2, for templated types) defines standartized names for these instances, simplifying library usage:<p>
 <div class="fragment"><pre class="fragment"><span class="comment">/*</span>
 <span class="comment"> egamma_ptr is typedef for object_ptr&lt;egamma&gt;, whose default</span>
@@ -99,13 +92,15 @@
 
 <span class="comment">/*</span>
-<span class="comment"> The egamma instance doesn&apos;t leak: if the shared_ptr instance which</span>
-<span class="comment"> wraps it isn&apos;t assigned to anything else, the pointer is deleted by</span>
+<span class="comment"> The egamma instance doesn't leak: if the shared_ptr instance which</span>
+<span class="comment"> wraps it isn't assigned to anything else, the pointer is deleted by</span>
 <span class="comment"> the destructor of either object_ptr, or Array, whichever runs last.</span>
 <span class="comment">*/</span>
-</pre></div><p>Pointers kept in object fields should be wrapped in a shared_ptr instance, which will automatically keep them valid (at least) for the lifetime of the containing object. When that isn't possible, it should be documented why their containing class doesn't delete them and who does.</p>
-<p>Pointers passed as arguments into functions (and methods) are generally not expected to stay valid after the function returns - when that is required, the parameter's documentation should specify the required scope:</p>
+</pre></div><p>
+Pointers kept in object fields should be wrapped in a shared_ptr instance, which will automatically keep them valid (at least) for the lifetime of the containing object. When that isn't possible, it should be documented why their containing class doesn't delete them and who does.<p>
+Pointers passed as arguments into functions (and methods) are generally not expected to stay valid after the function returns - when that is required, the parameter's documentation should specify the required scope:<p>
 <div class="fragment"><pre class="fragment"><span class="comment">/* the pointer must stay valid for the lifetime of the object */</span>
 CurrentContext ( <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> idx );
-</pre></div><p>A simpler alternative is just to pass a shared pointer:</p>
+</pre></div><p>
+A simpler alternative is just to pass a shared pointer:<p>
 <div class="fragment"><pre class="fragment"><span class="keyword">class </span>mepdf : <span class="keyword">public</span> mpdf
 {
@@ -114,6 +109,7 @@
         mepdf (shared_ptr&lt;epdf&gt; em) {
                 iepdf = em;
-</pre></div><p>In the case above, passing a (constant) reference to <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;epdf&gt;</a> might be more efficient, but no measurements have been performed.</p>
-<p>Functions returning raw pointers should document the scope of their validity:</p>
+</pre></div><p>
+In the case above, passing a (constant) reference to <a class="el" href="classbdm_1_1shared__ptr.html">shared_ptr&lt;epdf&gt;</a> might be more efficient, but no measurements have been performed.<p>
+Functions returning raw pointers should document the scope of their validity:<p>
 <div class="fragment"><pre class="fragment"><span class="comment">/*</span>
 <span class="comment"> Returns the stored pointer (which remains owned by this</span>
@@ -121,10 +117,11 @@
 <span class="comment">*/</span>
 T *<span class="keyword">get</span>();
-</pre></div><p>Functions generally shouldn't return raw pointers allocated by operator new - such pointers should be wrapped in an instance of shared_ptr, so that the pointer's unlimited life expectancy is encoded in the function signature:</p>
+</pre></div><p>
+Functions generally shouldn't return raw pointers allocated by operator new - such pointers should be wrapped in an instance of shared_ptr, so that the pointer's unlimited life expectancy is encoded in the function signature:<p>
 <div class="fragment"><pre class="fragment"><span class="keyword">virtual</span> shared_ptr&lt;epdf&gt; marginal (<span class="keyword">const</span> RV &amp;rv) <span class="keyword">const</span>;
 </pre></div> </div>
-<hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:05 2009 for mixpp by&nbsp;
+<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 17:34:45 2009 for mixpp by&nbsp;
 <a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
 </body>
 </html>
