3.1.1.4 Resource Model

The visual and rendering target objects are two examples of composition engine resources. A resource is any object that is explicitly created by the client on behalf of the server, upon receiving a resource creation message. Resources are referenced by handles scoped to the channel in which they are created. These handles follow the lifetime rules as specified in section 3.1.1.

Resources can reference other resources in the same scene graph. This appears in the protocol as a message that contains two or more handle values, one representing the resource that is the target of the message and the others representing resources to be referenced by the first. A resource is considered live if it has a handle or is referenced by another live resource. This can be implemented by a client by using a variety of schemes, such as reference counting or garbage collection. The protocol does not specify any read-back capabilities. Therefore, once the server issues a handle deletion message, the resource previously referenced by that handle becomes inaccessible to the server. However, it can still have an effect on the scene graph, if it is referenced by another live resource. A resource can only be deleted ultimately by the client when it is not associated with a handle and not referenced by another live resource.