Destroy_Object - cObject
Sent when an object is about to be destroyed
Type: Event
Parameters:
None
Syntax
Procedure Destroy_Object
Description
The Destroy_Object event is sent to an object when it is about to be destroyed. It can be used to handle any additional processing required to destroy the object.
- This event destroys the object so it must be forwarded. Not forwarding the message will not destroy the object, will create an unstable environment and is in all cases considered to be an error.
- You should never send this message. It should only be used for augmentation.
- Normally, any augmentations applied to this event will occur before you forward the method (after the forward the object no longer exists).
Procedure Destroy_Object
Send DoWriteContentsToFile
Forward Send Destroy_Object // must be sent
End_Procedure
You should never send the messages Construct_Object or Destroy_Object. These are event methods that are automatically executed whenever an object is being created or destroyed. Objects are constructed when an object declaration statement is executed. If you wish to manually destroy an object you should execute the Destroy message.
For more information refer to: the Destroy method and Dynamic Objects.
Notes
- You should always deactivate object before destroying them.
- Prior versions of DataFlex would use this method as a procedure and not an event. In other words, the message was used for sending and not just for augmentation. This usage is obsolete.
See Also
Create | Destroy