hacks

You are currently browsing articles tagged hacks.

Mat DeLong just posted another great example of when not to abuse class helpers in Delphi (though I should add that he didn’t seem to see it that way). :)

But you don’t need helpers to do what this technique achieves, and in my view you really shouldn’t be using helpers for it in the first place.
Read the rest of this entry »

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….

Read the rest of this entry »