Sometimes it is useful to be able to take a reference to an object without having to force specific implementation on the object, e.g. when providing a generic storage class to scripts, or providing a generic messaging system.
In AngelScript there is no common denominator for all object types, the reasons for this is that script classes and application registered classes have completely different implementation and cannot be generalized under a single superclass.
Instead, AngelScript provides an alternative by allowing the application to register a generic handle type. This type would be implemented according to the application's needs, but to the script it would look like it was a generic handle that can reference any reference type. With this the type will be able to hold objects, functions, and arrays.
To register the generic handle type, the application should follow the same principles as for a value type, except for a few details, that will be described here.
As this is a quite useful type, with really very little need for customization, a standard add-on with this implementation has been provided with the SDK.