oracle.ide.util
Class AddinPolicyUtils

java.lang.Objectoracle.ide.util.AddinPolicyUtils

public class AddinPolicyUtils

extends java.lang.Object

A utility class containing addin policies we want to enforce. This Class is removed in non debug builds. This class should not be used by extension developers outside Oracle. It is used to enforce performance policies that apply to functionality developed within Oracle.

ensureGarbageCollectable

Determines whether the given object is available for garbage collection within the given time bounds. This works by starting a thread that holds a weak reference to the object, and periodically checking if the reference is cleared (and calling System.gc(). If after seconds seconds the reference is still not cleared, an error message is printed to the console.

Parameters:

obj - The object to check

seconds - The number of seconds to wait around hoping for the object to be collected.