|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> The first problem is: How should the object be copied? There are many
> possibilities:
If you are wondering which solution the STL data containers use,
it's usually just a simple deep-copy whenever the container is copied
or assigned. (While this is implementation-defined, you can assume that
the vast majority, if not all, of the STL implementations out there use
deep copying.) You should take this into account when using the STL.
(In other words, never needlessly copy/assign a large data container.)
As said, deep-copying is the easiest/simplest solution in terms of
memory management, but you have to be careful to not be copying them
around without a good reason.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |