[Lazarus] zeos and heaptrc (interfaces?)

Luca Olivetti luca at wetron.es
Mon Jul 7 15:07:51 CEST 2008

En/na Joao Morais ha escrit:
> Luca Olivetti wrote:
>> I was trying to detect memory leaks, so I activated the -gh (use 
>> heaptrc) option in compiler options.
>> I left it activated and I added a zeos component (an sql query).
>> As soon as I activate the query, the program exits (with no exceptions 
>> but a lot of heaptrc errors).
>> If I remove heaptrc the program works fine (and it doesn't appear to be 
>> leaking memory, btw).
>> I see that zeos extensively uses interfaces, maybe is there some problem 
>> using heaptrc with interfaces?
> I am also using refcounted interfaces and observed several leaks with 
> 2.2.0, which disapeared a couple of weeks ago with branches_2_2. What is 
> your fpc version?

It was a win32 lazarus snapshot from 2008-06-08 with fpc 2.2.3 (2.2.2 
rc1 was just branched at the time, so I suppose it's pretty similar to 
However what bothers me is not the memory leak (I think there is none) 
but the fact that the program terminates as soon as I activate the query.

Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007

More information about the Lazarus mailing list