Uncategorized

Lightweight Multicast Events

A multicast event is an event that can have multiple listeners (or event handlers). Some languages (such as .NET languages) have built-in support for multicast events. This article shows an implementation for Delphi. This implementation is very lightweight. In fact, it takes no more resources than a regular Delphi event if there is just a… Continue reading Lightweight Multicast Events

Foundation · Patterns · Tips & Tricks · Uncategorized

Custom Managed Records for Smart Pointers

In this 3rd part in (what turns out to be) a series about Custom Managed Records, we take a look at how they can be used to create smart pointers. About Smart Pointers But first we have to get some terminology straight. Smart Pointers is an umbrella term behind different technologies for making it easier… Continue reading Custom Managed Records for Smart Pointers

Foundation · Patterns · Tips & Tricks · Uncategorized

Automate Restorable Operations with Custom Managed Records

There are those common try..finally blocks that you write over and over again. For example entering and leaving a critical section to protect resources from multiple threads, or calling BeginUpdate and EndUpdate to efficiently bulk-update a FireMonkey control. These kinds of “restorable” operations can be automated with the new Custom Managed Records feature introduced in… Continue reading Automate Restorable Operations with Custom Managed Records