
19 May
2006
19 May
'06
11 a.m.
"Tobias Schwinger" wrote: [ COW implementation of pimpl ]
Note that you have to synchronize the reference counter and also the copy operation in a multithreaded environment.
If a read-write lock will be added it should be optional - the overhead may be too big. It should be also possible to _manually_ trigger the cloning: * it the pimpl is passed into another hread and we do not want to deal with locking * if the member is const but changes a mutable data and the design cannot be changed. /Pavel