[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Order of _free calls on objects perhaps broken


When gambas exits a program it releases objects by calling the _free() function in each object if present.

This method is not starting from the main application downward, but appears to go linearly through an internal list of objects calling the _free() as it goes along.

This is leading to a lot of circular reference and unreleased memory, when there is a hierarchical use of objects.

Where the top object releases the references to each of the objects it in turn contains. I don't know if any one else has experienced this, the use of quit hides the reporting of circular references. Or calling the _free() method on the top level object manually also fixes this.

Is it possible to correctly start at the main or top of the object chain to do the releases ? Maybe not, perhaps Just have to manually release objects when an application terminates.

Is this a bug or a feature?

--
~~~~ Brian

Attachment: OpenPGP_0x78BFB26402F48419.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


Follow-Ups:
Re: Order of _free calls on objects perhaps brokenBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>