ConstaChymic
Member
I've tried something like this:
However this always makes GM freak the hell out and fail to compile with the error
The only way I've gotten this to work proper is to just pass itself in as an argument (though I haven't extensively tested if that even works proper).
If there isn't an actual way to do this then I feel like that's a massive oversight.
GML:
static free = function ()
{
delete self;
}
Cannot set a constant ("@@This@@") to a value
, even though I feel like it should work? Unless I'm being a moron and self
doesn't work the way I think it does, or maybe I'm missing a built-in override for struct cleanup, similar to the __tostring
method or whatever it's called.The only way I've gotten this to work proper is to just pass itself in as an argument (though I haven't extensively tested if that even works proper).
GML:
static free = function (me)
{
delete me;
}
this_struct.free(this_struct);