On Wed, Jul 16, 2008 at 7:33 PM, Michiel Helvensteijn <
m.helvensteijn@gmail.com> wrote:
I am looking for a simple way to implement copy-on-write classes.
Several `copies' of an instantiation of such a class can coexist and share
the same data in memory until someone changes their `copy' (calls a
non-const member function). At that time, a deep copy is made and the
change is only made in that one location. The deep copy is not needed, of
course, if the instantiation has only one handle. All of this should be
transparent to the user of the class.