Patching A Class VMT

[Estimated Reading Time: 6 minutes] Caution: The contents of this post may cause dizziness or nausea.  Take only as prescribed and if symptoms persist seek professional advice. Recently I found myself needing to do something I had never done before – create an instance of an arbitrary class derived from some base class and destroy it, and do so without invoking any constructor or destructor code that the derived class(es) may have introduced. This is the difficult bit. Impossible?  Don’t be silly, this is Delphi we’re talking about….