Growing memory and MySQL lazarus / 16-Databases ---------------------------------------------------------------------- Mike · 2006-04-06 11:37 Hello all, I'd like to know what I'm doing wrong (certenly I'm doing something wrong). Here is a problem described: - I have a OnTimer event (TTimer component) defined like this: MySQLQuery.SQL.Text := 'SELECT CVSKEY FROM CVS WHERE CVSCID=' + IntToStr(ChannelID) + ' AND CVSNBR IS NULL'; MySQLQuery.Open; CallID := MySQLQuery.Fields[0].AsInteger; MySQLQuery.Close; the interval of TTimer is 2000ms. My problem is that after ex. 12 hours of working my application memory usage is very high (over 100MB). What should i free (or something) on each interval? Is there a better way to do select to db? Thanks in advance, Mike ---------------------------------------------------------------------- Marc · 2006-04-06 14:25 if you dont create a MySQLQuery each time in your timer event, this code looks valid. In that case there is a memleak in the TQuery descendent. See if you can pinpoint it with a heaptrace, or file a bugrep at the FPC site (if it aisn't already reported) (or askthe ML if there is such problem known)