From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8acd4291c317f897 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,8acd4291c317f897 X-Google-Attributes: gid109fba,public From: herwin@gmu.edu (Harry Erwin) Subject: Re: Safety of the Booch Ada 95 Components Date: 1999/12/12 Message-ID: <1e2puqr.1ps7vpt1hpolsaN%herwin@gmu.edu>#1/1 X-Deja-AN: 559896494 References: <1e2lds4.7trgj21rgj9i0N%herwin@gmu.edu> <38512921_3@news1.prserv.net> <3851c7b9_4@news1.prserv.net> <1e2ns7h.cx85ir1azwo9iN%herwin@gmu.edu> <82up01$ddg$1@nnrp1.deja.com> Organization: HDE Associates X-Server-Date: 13 Dec 1999 01:17:22 GMT User-Agent: MacSOUP/2.4.1 Newsgroups: comp.lang.ada,comp.lang.c++ Date: 1999-12-13T01:17:22+00:00 List-Id: Robert Dewar wrote: > In article <1e2ns7h.cx85ir1azwo9iN%herwin@gmu.edu>, > herwin@gmu.edu (Harry Erwin) wrote: > > A deep copy of a pointer data structure may require more > > memory than is available. > > > A naive copy may have that characteristic, but it is always > possible on modern machines to do such a copy with no additional > storage. It just takes a bit of cleverness. Remember that every > pointer has at least two spare bits. > If what you're suggesting is sharing the underlying data, it's risky in C++ since we have to manage the free store explicitly, rather than relying on garbage collection. It is done that way for STL strings, but there are some known problems, especially in a multithreaded environment. In any case, this discussion has been very educational. I now know where in the documentation to go look for answers. With thanks, -- Harry Erwin, PhD,