Skip to main content

clearContents

Short summary​

This method is called in the destruct method and is intended to zero all references and interfaces that should not be destructed. To delete the collection with all its contents, use deepDestruct() instead of destruct().

Parameters​

none

Code​

Declaration​

METHOD PROTECTED clearContents
VAR CONSTANT
(* NULL is a constant which is always 0 *)
NULL :__XWORD := 0;
END_VAR

Implementation​

THIS^.left := NULL;
THIS^.right := NULL;
THIS^.nodevalue := NULL;