Directives 

DROP OBJECT

Delete Object

Format

DROP OBJECT obj_id[,ERR=stmtref]
  
Where:

obj_id

Object identifier.

stmtref

Program line number or statement label to which to transfer control.

Description

The DROP OBJECT directive is used in Object Oriented Programming to delete an object. DROP OBJECT, DELETE OBJECT and REF( ) can all be used to delete an object.

Only objects whose reference count is 1 can be deleted. Once an object is destroyed, its identifier may be reassigned to another object, although this is not recommended. All objects are destroyed when the application issues a START directive or if the END directive is entered at the Command mode.

REF (READ obj_id) returns the current reference count value. All calls to REF ( ) return the current reference count (or 0 if deleted).

See Also

DEF CLASS Define Object Class
DELETE OBJECT Remove Windows Object
DROP CLASS Delete Class Definition
FUNCTION Declare Object Method
LIKE Inherit Properties
LOAD CLASS Pre-Load Class Definition
LOCAL Designation of Local Data
PROGRAM Create/Assign Program File
PROPERTY Declare Object Properties
RENAME CLASS Change Name of Class
STATIC Add Local Properties at Runtime
NEW( ) Create New Object
REF( ) Control Reference Count