Community articlesetHardGCFlag method
Added by IBM contributorIBM on August 15, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


Deprecated in IBM® Forms Server – API version 3.5. As of this version, you cannot call setHardGCFlag with the parameter true.
The default setting for the HardGC flag is false, which results in better API performance.


public static void setHardGCFlag (
   boolean setFlag


setFlagbooleanIf true, as of version 3.5 of the API, a UWIRuntimeException exception is thrown. If false, in most cases the JVM will manage garbage collection. See the Notes section below for exceptions to this rule.


Nothing. If called with the parameter true, the setHardGCFlag method throws a UWIRuntimeException exception with the text "This method has been deprecated."


The Streaming API is not affected by the state of the HardGCFlag. However, code that contains a call to setHardGCFlag with the parameter true will throw a UWIRuntimeException exception.
When the HardGC flag is false, the memory used by the following objects is not recovered during JVM garbage collection:
  • signature objects
  • certificate objects
  • hash objects
  • com.PureEdge.GenericInterface objects
To recover the memory from these objects when the HardGC flag is false, call the release method when you are finished with them. For information on the release method, see the Signature Class, Certificate Class, Hash Class, or IFX Class.
Parent topic:
DTK class