IsInDestroy
(Available in 01 TS COM - TS_COM_IUnknown)
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 SomeIClass
// 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( ulIsInDestroy ) CLASS TS_IUnknown
LOCAL lIsInDestroy AS LOGIC
TSTrace Enter
IF IsLogic( ulIsInDestroy )
IF ulIsInDestroy
SELF:_ObjectStat1:=_OR( SELF:_ObjectStat1 ; ...
... , TS_OBJSTAT1_INDESTROY )
ELSE
TSTrace Warning Debug "Should not be called with '!ulIsInDestroy'"
END
END
IF LOGIC( _CAST, _AND( SELF:_ObjectStat1, TS_OBJSTAT1_INDESTROY ; ...
... ) )
lIsInDestroy:=TRUE
ELSE
lIsInDestroy:=FALSE
END
TSTrace Leave
RETURN lIsInDestroy