It’ll be difficult. The most difficult part is two folded. First, the language does not generate code to track active handles. This can be remedied by having a special subclass of WhereIs for variables in a problem. Of course, it still relies on the programmer to use the subclass only for variables, and use the base class for members in classes.
However, the most difficult part is tracking handles (WhereIses) as data members of classes. Without this capability, it is not possible to mark all allocated memory objects that are in use.