[Gambas-user] getting warning when quitting running application

Charles Bukowski charlesbukowski.italy at gmail.com
Wed May 11 19:12:31 CEST 2022

I fixed it listing all forms into a button click event and using close
method :
Public Sub BCloseProgram_Click()
This way console warning disappears.
I am just trying to program with this language and I've used it to create a
simple two forms application.
Is there a way to "index" and apply close method to all open forms, in case
of an application made of many, in order to completely close it and freeing
all allocated resources?

Il giorno mer 11 mag 2022 alle ore 18:13 Bruce Steers <bsteers4 at gmail.com>
ha scritto:

> On Wed, 11 May 2022 at 16:59, Charles Bukowski <
> charlesbukowski.italy at gmail.com> wrote:
>> Hi, I am using quit command to end an application.
>> But I get the following from the ide console  :
>> gbx3 [4289]: warning: 1 allocation(s) non freed.
>> Is there a way to understand what is allocating resources and destroy it?
>> Or can this warning being ignored?
>> thx
> It will probably be some kind of object that was created and needs to be
> destroyed.
> Are you using Quit because the application won't exit cleanly otherwise?
> (that's never really the best way to go)
> Make sure all file handles / timers / processes are stopped/killed
> Add a few object killing things to your Form_Close() event like..
> ThisObjectCreated = Null
> ThisOtherObjectCreated = Null
> without seeing your code it's hard to guess what it could be.
> As for an actual way to track down exactly what it is there may be a debug
> option but i forget it.
> BruceS
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220511/46acd8f3/attachment.htm>

More information about the User mailing list