FB_Exit
Short summary
Mark the object as deleted, as it stays in the memory.
- Return type:
BOOL
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| bInCopyCode | BOOL | TRUE: the exit method is called in order to leave the instance which will be copied afterwards (online change). | input |
Code
Declaration
METHOD FB_Exit : BOOL
VAR_INPUT
(* TRUE: the exit method is called in order to leave the instance which will be copied afterwards (online change).*)
bInCopyCode : BOOL;
END_VAR
Implementation
IF
THIS^.isObjectValid(THIS^.rootNode)
THEN
THIS^.destructNodeAndAllChilds(node := THIS^.rootNode, destructNodeContents := TRUE);
END_IF
IF THIS^.isObjectValid(THIS^.nodeComparator) THEN
THIS^.nodeComparator.deepDestruct();
END_IF
IF (THIS^.nodestack <> 0) THEN
__DELETE(THIS^.nodestack);
END_IF
IF THIS^.isObjectValid(THIS^.subtractIterator) THEN
THIS^.subtractIterator.deepDestruct();
END_IF
IF THIS^.isObjectValid(THIS^.insertIterator) THEN
THIS^.insertIterator.deepDestruct();
END_IF
IF THIS^.isObjectValid(THIS^.intersectIterator) THEN
THIS^.intersectIterator.deepDestruct();
END_IF
IF THIS^.insertBuffer <> 0 THEN
__DELETE(THIS^.insertBuffer);
END_IF
IF THIS^.intersectedTree <> 0 THEN
__DELETE(THIS^.intersectedTree);
END_IF