Delphi Gem of the day: putting "reintroduce" on a destructor.

Delphi Gem of the day: putting "reintroduce" on a destructor.

    destructor Destroy(); reintroduce; overload;

In our case all we got was a memory leak because the rest of the inheritance chain didn't override the destructor.

Comments

  1. Can you have both reintroduce and override? I don't think it makes sense, so I'll have to try it

    ReplyDelete
  2. There is no limit to how bad things can get :)

    ReplyDelete

Post a Comment