JavaFreeObject Function

Action

Frees a java object. Must be called on all objects instantiated with JavaLoadObject or retrieved with JavaGetObject.

Include file

Java.bdh

Syntax

JavaFreeObject( in hObject: number ): boolean;

Return value

  • true if the object could be released

  • false otherwise

Parameter Description
hObject Valid handle to a java object.

Example

var
  hTestObj   : number; 

dcltrans
  transaction TInit
  begin
      // Load and start the JVM.
      JavaCreateJavaVM();

      // instantiate the java class
      hTestObj := JavaLoadObject("Test");
  end TInit;

  transaction THello
  begin
    JavaCallMethod(hTestObj, "doHello");
  end THello;   

  transaction TEnd
  begin
    JavaFreeObject(hTestObj);
  end TEnd;

Sample scripts

JavaFrameworkBankSample.bdf

BankSample.java, Account.java, Customer.java, PremiumCustomer.java