Smart records in Object Pascal are very nice, but they have a stupid limitation – you cannot implement a destructor for a record. A solution for that is quite simple and can be found all over the internet – add an interface to this record and implement the cleanup in this interface. To make it even ...
More...