[Gambas-devel] Proper way to free memory
Benoît Minisini
gambas at ...1...
Sat Feb 18 14:00:55 CET 2012
Le 17/02/2012 19:54, Randall Morgan a écrit :
> HI,
>
> If I have a class that allocates memory using GB.Alloc() and that memory
> is used for the life of the class, How can I free this memory as the
> class exits. I've tried calling GB.Free() in a CLASSXXX_free() method
> but I still get an error from gb3x telling me that 1 allocation was not
> freed.
>
> Thanks for your help!
>
Use the static destructor "_exit".
--
Benoît Minisini
More information about the Devel
mailing list