Hi All, I would like to know the benefit of making constructor / destructor virtual. As described here:
http://c2.com/cgi/wiki?VirtualConstructor The benefit of virtual constructor seems related to "class reference". As far as I understand, it is related to how LCL works, like: CreateComponent(AComponent: TComponentClass); My questions are: 1) if the above understanding is correct AND COMPLETE, why the constructor of TObject is not virtual? What problem will appear IF we make it virtual? 2) What is the purpose of making destructor of TObject virtual? Thanks! Xiangrong
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal