Temporary suspension of disbelief (invariant)

Walter Bright newshound2 at digitalmars.com
Wed Oct 27 14:07:00 PDT 2010


Fawzi Mohamed wrote:
> Not only that it might be useful for some methods to delete the object 
> itself.

The pimpl pattern should be used for such, if you want to use an invariant.

Note that the C++0x shared_ptr uses pimpl in that the ref count is held 
separately from the object.


More information about the Digitalmars-d mailing list