Creates a new tracked registry. The only restriction on the registration function is that it requires at least one argument, which is used to track the registration. The unregistration function must be able to unregister the entity using the entity parameter alone.
a function that can be called to register a new entity
a function that can be called to unregister an entity
Registers some entity in the wrapped registry by calling the registration function with the provided arguments. The resuly of registering the same entity multiple times is undefined.
the argument that uniquely identifies the registered object; usually a handler function
additional arguments passed to the registration function
Unregisters a previously registered entity by calling the unregister function with the provided entity.
the entity to be unregistered, as passed to register
Unregisters all tracked entities.
A tracked registry provides a wrapper to automatically track registrations made by your script in some other registry. By registering something through a tracked registry, the wrapper will automatically keep track of what is currently registered and allow all registered entities to be unregistered automatically (for example, when a plug-in is unloaded). Other classes in the library build on this base class.