$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Review of a safer memory management approach for C++?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-05-26 23:52:44
On 05/26/10 17:37, Bartlett, Roscoe A wrote:
 > Hello Boost developers,
[snip]
 > pointers in high-level code.   The technical report for the approach
 > is:
 >     Teuchos C++ Memory Management Classes, Idioms, and Related
 >     Topics The Complete Reference A Comprehensive Strategy for Safe
 >     and Efficient Memory Management in C++ for High Performance
 >     Computing
 > and can be found at:
 >
 >     http://www.cs.sandia.gov/~rabartl/TeuchosMemoryManagementSAND.pdf
[snip]
Page 24 contains:
   ill-conceived ability to implicitly convert arrays of derived types to
   arrays of base types.
There only one problem with doing that that I can think of and that's
the difference in sizes which would lead to operator++ for base array
possibly pointing to the middle of an object of the derived type. 
However, couldn't that be overcome by wrapping the container in
something that adjusted the operator++ to increment the pointer by
the derived type size while returning a pointer to the base type?
Also, the table on that page just mentions Array's.  What about all
other stl types which are implemented using pointers (like std::list).
How would one know whether or not the list elements contained
elements that pointed to the same list object; thereby leading to
a circular reference.  How would that be handled?