
19 May
2006
19 May
'06
5:17 p.m.
Asger Mangaard wrote:
Tobias Schwinger wrote:
Could you give an example?
Let's see (untested and incomplete code for illustration only): ....
It seems like you assume that two pimpl_ptr instances can hold the same pointer. This is _not_ the case.
Why not?
Each instance of pimpl_ptr will have its own instance of T, thus the COW (copy on non const access) isn't needed.
COW (copy one write, which is what it actually stands for) is a common optimization technique. It's never /needed/ it just makes things faster ;-). Regards, Tobias