This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
_destroy
The optional _destroy function has two basic properties:
1.is automatically called once the variable goes out of scope
2.it does not take any parameters
Defining it in context of Point2D has no meaning, but we can use it to illustrate how it works:
TYPE Point2D
x AS SINGLE
y AS SINGLE
FUNCTION _create(x AS SINGLE, y AS SINGLE)
ME.x = x
ME.y = y
msgBox strFormat$("Point2D Variable is being created with x = {1}, y = {2}", ME.x, ME.y)
END FUNCTION
FUNCTION _destroy()
msgBox "Point2D Variable is being released"
END FUNCTION
END TYPE
msgBox "Hello, I am about to call MyFunction"
MyFunction()
msgBox "Hello, I finished calling MyFunction"
FUNCTION MyFunction()
DIM p AS Point2D(1, 2)
END FUNCTION