[Gambas-user] Releasing allocated memory and closing a database

Alain Baudrez a.baudrez at ...626...
Sun Oct 13 14:41:57 CEST 2013


Txs for the info,


Alain


2013/10/13 Benoît Minisini <gambas at ...1...>

> Le 12/10/2013 21:42, Alain Baudrez a écrit :
> > In an app where I use a class to retrieve info from a database, I use the
> > constructor method _new() to open the connection to the db as follows:
>
> The database is automatically closed when the Connection object is freed.
>
> The Connection reference stored in $db is automatically released when
> the Gambas "db" object is freed. If $db is the only reference, then the
> Connection object is freed, and the database is closed.
>
>



More information about the User mailing list