Virtual functions called after destructor
Yes, I know this decision has been brought over from the Delphi world but I still find it a bad one. Today I was bit by the fact that the virtual GetHashCode() is called after the destructor to my C++/CLI has finished executed and the base class destructor is called. The decision to have virtual functions called before the constructor has finished constructing an object and after the destructor has finished destroying an object leads to the anomaly that if GetHashCode() were called prior to construction ( I doubt it is but it could be ) it would be nearly impossible for it to return the same value. As it is I must change my code to handle this call after my destructor has finished with its code. Arghhh ! Whoever decided to bring this abortion to the .net world, whether Mr. Hejlsberg or otherwise, was just plain wrong in that decision. I hope the future of OOP programming will throw this idea in the garbage where it belongs.
[937 byte] By [
eldiener] at [2007-12-23]