[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (OT) Re: memory management



Nicholas Lee wrote:

> > Is that lightweight enough for you? Does two things: enables general
> > containers by having a type compatible with all the other ones and makes
> > destructor works correctly (damn C++, why isn't "virtual" the friggin'
> > DEFAULT???).
> 
> But then in C++ you run into the problem of always having to remember the
> possibility of multiple inheritances.  End up having to throw "virtual
> public Object" all over your code.

Yes, that's why I banned it in my code (and for various other reasons,
mostly of religious flavors), except for "interface" classes, classes
that only have pure virtual methods, causing no need to "virtual public
Object".

-- 
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi