IsInDestroy
(Available in 00 TS Tools(Base) - TS_Tools_Root0)
Purpose
Set the 'IsIndestroy' flag
Syntax
SELF:IsInDestroy:=TRUE
Arguments
Description
This method is normaly only called from the 'Destroy()' method and sets the 'IsIndestroy' flag to TRUE, this flag can not be set FALSE. This flag should be set TRUE form the 'Destroy()' method ( as soon as posible in the method ).
Example
METHOD Destroy( ) CLASS SomeClass
// Let it be known that we are destroying the object
SELF:IsInDestroy:=TRUE
// Do the destructive work
...
// All work should be done before calling SUPER
SUPER:Destroy( )
RETURN NIL
Source
ASSIGN IsInDestroy( lIsInDestroy AS LOGIC ) AS LOGIC PASCAL CLASS TS_Root0
TSTrace Enter
IF lIsInDestroy
SELF:_ObjectStat1:=_OR( SELF:_ObjectStat1 ; ...
... , TS_OBJSTAT1_INDESTROY )
ELSE
TSTrace Warning Debug "Should not be called with '!lIsInDestroy'"
END
IF LOGIC( _CAST, _AND( SELF:_ObjectStat1, TS_OBJSTAT1_INDESTROY ; ...
... ) )
lIsInDestroy:=TRUE
ELSE
lIsInDestroy:=FALSE
END
TSTrace Leave
RETURN lIsInDestroy