XLL+ Class Library (7.0)

RTD Object Handles

In XLL+ 6.2, we've added a new kind of object handle, implemented using RTD. This has several advantages over the previous model.

Object lifetimes

Using RTD, an event is raised when an object handle is no longer being used by Excel. The XLL+ run-time calls the destructor for the object as soon as this occurs. This means that the run-time cache is much smaller, since it contains only live objects, and performance is much improved, especially with large objects.

Also, it is not necessary to do any house-keeping, such as providing a "Clear handles" menu.


With RTD handles, it is no longer necessary to force a recalculation of handles in reopened workbooks. If a handle is stale, Excel and the XLL+ framework mangage this automatically. Any handle that needs to be rebuilt will be recalculated, and any that do not recalulation will be left intact.

Customizable handle formats

Developers can customize the layout and content of handles, and can include information from the object itself. For example, a handle can contain its type, name and other properties, as well as the computer-generated handle details:


This makes for much more user-friendly handles; it becomes much easier to understand the structure of a spreadsheet that uses handles, and to track down problems.

Object cache

We've added some classes to make it simple to store your objects in a cache for improved performance. The cache can be tuned using heuristics that include size of cache and age of object.

For more details see Object Handles in the User Guide.