H (Hybrid) Language - v0.03, by Dr. Herong Yang
__delete() - Object Destructor Method
This section describes what is object destructor method.
Object destructor method, __delete(), is a special object method automatically created by the H system when a $class statement is executed. You should never create your own version of __delete() method to override the system created version.
The syntax to call the destructor method is:
object_reference.__delete();
When an object is deleted, all references to this object will be assigned to $null.
Examples of calling object constructor functions:
# an empty class $class dummy: {}; # create a "dummy" object d = dummy(); # delete the "dummy" object # d is assigned to $null after d.__delete();
Table of Contents
$class Statement - Create New Classes
Execution of $class Definition Body
__new() - Object Constructor Function
$instance Statement - Define Instance Template
Execution of $instance Definition Body
$method Statement - Define Object Method
_first() Method - Object Initialization
Access Class Variables from Object Methods
►__delete() - Object Destructor Method
$delete Statement - Delete Objects
_last() Method - Object Cleanup
Inheritance - Object Attachments