[Gambas-user] The Wiki has two "Special Methods" pages, why?
T Lee Davidson
t.lee.davidson at gmail.com
Thu Dec 15 22:00:14 CET 2022
On 12/15/22 13:06, BB wrote:
> They are two quite different topics. For instance, the "language" _Free page is about the "_Free" command in Gambas but the
> _Free page in the "developers" is about how to implement the _Free command when using the programming interface.
Maybe I'm dense, but this doesn't make sense to me.
The Free command frees a memory block allocated by Alloc.
And, both pages regarding the _free method say the same thing in the first sentence:
"The _free method is called when an object of the class is destroyed." (/wiki/lang/special/free)
"The _free method is called when an object of the class is destroyed." (/wiki/dev/api/cat/special/_free)
/wiki/dev/api/cat/special/_free also says, "Use this method to cleanup the object." One might think from this that the _free
method should be used to free (child) objects, not excluding objects that raise events, created by the object being freed.
More information about the User