Handles associate respective native resources with an application that
utilizes a library to call for the native resource. Each handle is
created to track a native resource that has been allocated to an
application. All native resources associated with the application are
freed by examining the handles to find those native resources still being
held by the application after they are no longer being used, or when that
application has been, or is being, terminated. If a native resource is
requested by the application and found to be unavailable, the handles are
reviewed to collect allocated native resources that are found to be
unneeded by their respective applications. A collected native resource
corresponding to the requested native resource is thereby made available
to be reallocated to the requesting application.