Entering content frameFunction documentation ABAP_DESTRUCTOR Locate the document in its SAP Library structure

Function

Deletes the JavaScript context, to which the reference variable points and resolves the links performed between JavaScript and ABAP Objects with BIND. The method does not delete the assigned object in the ABAP program, however. Vice versa, deleting the object in the ABAP program does not automatically mean that the JavaScript context is deleted. For this reason, the ABAP_DESTRUCTOR method should be executed before the ABAP Object (garbage collection) is deleted. After the ABAP_DESTRUCTOR method has been executed, all references to the ABAP Object should be initialized and this object deleted. Accessing the object again results in a program termination.

Example

Example

data JS_PROCESSOR type ref to CL_JAVA_SCRIPT.
JS_PROCESSOR = CL_JAVA_SCRIPT=>CREATE( ).

...

JS_PROCESSOR->ABAP_DESTRUCTOR( ).
CLEAR JS_PROCESSOR.

Leaving content frame