org.eclipse.actf.util.win32.comclutch

## Class ResourceManager

- java.lang.Object
- - org.eclipse.actf.util.win32.comclutch.ResourceManager

    public class ResourceManager
    extends Object

ResourceManager treats the life cycle of the native resources. All resources are wrapped by Java object, so the resources can be managed by the garbage collection system.

### Method Summary

Methods
`void` `addResource(IResource target)`
`IResource` `findInResource(long ptr)`
`static ResourceManager` `newResourceManager(ResourceManager parent)`
`void` `releaseAll(IResource except)` All resources will be released.
`void` `removeResource(IResource resource)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### findInResource

    public IResource findInResource(long ptr)

Parameters:
  `ptr` - the reference pointer to be searched
Returns:
  the instance of IResource having ptr. It returns null if resource is not found.

#### releaseAll

    public void releaseAll(IResource except)

All resources will be released.

Parameters:
  `except` - the resource to be excluded from the clearance

#### removeResource

    public void removeResource(IResource resource)

Parameters:
  `resource` - the resource to be removed from the manager

#### addResource

    public void addResource(IResource target)

Parameters:
  `target` - the resource to be added to the manager

#### newResourceManager

    public static ResourceManager newResourceManager(ResourceManager parent)

Parameters:
  `parent` - the parent resource manager
Returns:
  the new instance of ResourceManager has the parent