Acquires a resource associated with an object.
Acquires a resource associated with an object.
The resource is stored under the key obj.id
,
and an internal use count is maintained, calling
dispose
on the resource if the count goes
back to zero.
the type of resource which must be a Disposable
the object used as a look-up key
the function that produces the resource if it was not yet in the cache
the resource, either already found in the cache or newly produced
Attempts to find a resource associated with an object.
Attempts to find a resource associated with an object.
the type of resource
the object used as a look-up key
the resource, if it was found in the cache, or None
Releases a resource associated with an object.
Releases a resource associated with an object.
This decreases the use count of the resource, and
calls dispose
on it if the count goes back to zero.
the object used as a look-up key
Context for rendering generated objects.