queries and MEMORY LEAKS

hi, I’ve seen that every query eats up a bit of ram, until you run out of available one and block the system

in this specific case i tried to make a new web app, connect to a sql server with session.dbA property in the open event of the session, then i created a webpage button ButtonA in which i use a rowset rA to make a query and then i close this rowset
every time i press the button the app consumes a bit of ram.

session.DBA as MSSQLServerDatabase

session.open
session.DBA as new MSSQLServerDatabase
Session.dbA.DatabaseName=“dbXX”
Session.dbA.Host=“ipXX”
Session.dbA.UserName=“xxAD”
Session.dbA.Password=“xxPW”
Session.dbA.TimeOut=60
session.open end

ButtonA.Action
dim rA as Rowset
rA=Session.dbA.SqlSelect(“select a,b,c from tblA”)
ra.close
ButtonA.action end

every time I press the ButtonA, the app eats a bit of ram, even if I close the connection to the db at session level.

What version of xojo are you using, I found and reported lots of database related leaks recently and they are being/have been fixed already in the latest release.

rel. 2.1 fixed this problem

I am experiencing a memory leak issue with Rowset also. I am using a simple method to read a single row from a PostgreSQL database. The database object is global, however, the Rowset object is local to the method. I close the Rowset and set the object to Nil before exiting the method. I am using Ubuntu 18.04 LTS 64Bit. If I use Recordset in place of Rowset, no memory leak occurs.

Forgot to mention, I am using 2019r3.1

In regards to the record being retrieved. There where two fields, ‘id’ char var(30) and ‘posted’ timestamp without timezone

Make sure you file a bug report against API 2 about this

Does it occur IF you explicitly close the rowset when you are done with it ?

Yes, even though the rowset is local to the method, I still close and set the object to Nil before I exit. Thank you for the response. I’ve chanced all the references to use Recordset and no leak occurs.