Patent ID: 8312062

Claim:
A method of preventing a resource leak, including: creating a resource management object having a reference to an implementation object; receiving, at a processor, an indication that the implementation object is no longer referenced by an entity other than the resource management object; in response to receiving the indication that the implementation object is no longer referenced by the entity, using the processor to determine whether a resource accessible via the implementation object is released; and in the event it is determined that the resource is not released, preventing the implementation object from becoming unavailable, at least temporarily, including by preventing a garbage collection process from consuming the implementation object by retaining, at least while the resource is not released, one or both of the resource management object and the reference from the resource management object to the implementation object wherein the existence of one or both of the resource management object and the reference from the resource management object to the implementation object prevents the garbage collection process from consuming the implementation object.