IsDestroyed

 (Available in 01 TS COM - TS_COM_IUnknown)

Purpose

Set the 'IsIndestroy' flag

Syntax

SELF:IsInDestroy:=TRUE

Arguments

lIsInDestroy
LOGIC

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

ACCESS IsDestroyed CLASS TS_IUnknown
LOCAL lIsDestroyed AS LOGIC
   TSTrace Enter
   IF LOGIC( _CAST, _AND( SELF:_ObjectStat1, TS_OBJSTAT1_DESTROYED  ; ...
  ... ) )
      lIsDestroyed:=TRUE
   ELSE
      lIsDestroyed:=FALSE
   END
   TSTrace Leave
RETURN lIsDestroyed