sysLib.javaRemove

The system function sysLib.javaRemove removes the specified identifier from the EGL Java object space. The object related to the identifier is also removed, but only if the identifier is the only one that refers to the object. If another identifier refers to the object, the object remains in the object space and is accessible by way of that other identifier.

sysLib.javaRemove is one of several Java access functions.


sysLib.javaRemove syntax diagram

identifier

The identifier that refers to an object. No error occurs if the identifier is not found.

This argument is either a string literal or an item of type CHAR, DBCHAR, MBCHAR, or UNICODE. The identifier must be cast to objID, as shown in a later example. EGL strips single- and double-byte blanks from the beginning and end of the argument value, which is case sensitive.

An example is as follows:

  sysLib.javaRemove( (objId)myStoredObject );

No run-time errors are associated with sysLib.javaRemove.

Note: By invoking the system functions sysLib.javaRemove and sysLib.javaRemoveAll, your code allows the Java Virtual Machine to handle garbage collection in the EGL Java object space. If you do not invoke an system function to remove an object from the object space, the memory is not recovered during the run time of any program that has access to the object space.

Related concepts
Java access functions

Related tasks
Syntax diagram

Related reference
Java access (system words)
sysLib.java
sysLib.javaGetField
sysLib.javaIsNull
sysLib.javaIsObjID
sysLib.javaRemoveAll
sysLib.javaSetField
sysLib.javaStore
sysLib.javaStoreCopy
sysLib.javaStoreField
sysLib.javaStoreNew
sysLib.javaType