Article

Creating a fake agile wrapper that is technically agile but is not useful outside its home apartment, part 1

The Old New Thing ·The Old New Thing ·Published 2026-08-03 ·5 min read

This article discusses the concept of creating a reference that is strong but releases its reference when the originating apartment tears down, utilizing the global interface table (GIT) for automatic release.

From the article

Last time, we considered what it means when the context callback fails , which prevents us from releasing the object in its original context. We noted that the problem is that when the original apartment tears down, we lose our chance to release the object.

What we want is something between a strong reference and a weak reference. We want a reference that is strong, but which releases its reference to the destination when the originating apartment tears down.

What we can do is register the object in the global interface table (historically known as the GIT, unrelated to the source control system). The usual reason for doing this is to allow the object to be accessed from another apartment by redeeming the registration cookie. We have no intention of accessing the object from another…


Share this resource


Discovered 2026-08-04 Source The Old New Thing Archive 2026-08 →