Smart pointers have a few uses, the most common being for memory management, providing a way of automatically managing the lifetime of an object in non garbage collected languages. In Delphi this is similar to what you get with reference counted interfaces but a smart pointer implementation does this in a generic way such that all objects can be managed without having to change the existing class (no need to implement interfaces or descend from TInterfacedObject).… Continue reading ›

June 2005

Practical interface usage – Lachlan Gemmell

This session will introduce Object Pascal interfaces (not user interfaces) and provide some practical examples of where they can be used. Examples will include interface usage in the VCL, using interfaces to build an application that be run either as a single exe or a distributed system, code that can be reused in both a web and desktop application, and a technique useful for library type code that gives a class seperate private and public interfaces.… Continue reading ›