Platform SDK: Transaction Server |
DispMan can track a resource which is not inventoried, based on knowledge of the object's lifetime. When a tracked (as opposed to allocated) resource is freed, it is destroyed and therefore not returned to inventory. This mode is useful for resources which are inexpensive to create and destroy rather than storing them in inventory, for a memory dispenser, or for a resource which is difficult to inventory because there are too many different types. In this case, a Dispenser directly creates a resource instead of asking DispMan to allocate one from inventory. Before returning this resource to the requesting application component, the resource dispenser tells DispMan to track the resource. This ensures that even if the component neglects to free the resource, DispMan will do so when the component's lifetime is over.