[lazarus] Lazarus memory leaks when painting

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Sep 12 03:43:25 EDT 2002


On Wed, 11 Sep 2002 19:56:44 -0400
"Andrew Johnson" <aj_genius at hotmail.com> wrote:

> On Wed, 11 Sep 2002 23:30:07 +0200
> Michal Bukovjan <bukovjan at mbox.dkm.cz> wrote :
> 
> >Hi,
> >
> >Looks like we are leaking a decent amount of memory with Lazarus when 
> >painting occurs.
> >Try running Lazarus, move your mouse to and fro over the component palette 
> >speedbuttons row, several times, memory usage grows by a megabyte.
> >Do that few times more, and Lazarus memory usage grows from about 8MB to 
> >27MB in my case!
> >
> >:-(
> >
> >Michal
> 
> Sorry, that would be my fault... untill Palettes are supported I have added 
> an internal Visual and Colormap to Bitmaps. In DeleteObject I accidently put 
> gdk_visual_REF, and gdk_colormap_REF, instead of UNREF.. DOH! just goes to 
> show you coding at 1am on a system with 768Mb ram isn't safe...
> 
> There are also a few routines which do not free an existing colormap when 
> you create a new one, but these aren't that big of a deal yet.. I have tall 
> of them I know of taken care of on my system. So I will just go ahead and 
> send another patch to Mattias as soon as I can tonight.. Sooner then I was 
> going too, but on lesser systems..errhem, systems with less memory.. ;-), 
> this could be a serious problem.

Patch applied.

This also includes: gradient fill and basic GetDeviceCaps.


Mattias






More information about the Lazarus mailing list