Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

Lazarus memory leaks when painting

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Johnson
Show quoted text 12 lines
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.

Andrew

_________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com

Reply by email

Mattias Gaertner
to Andrew Johnson
Show quoted text 27 lines
On Wed, 11 Sep 2002 23:30:07 +0200 Michal Bukovjan 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

Reply by email

Tony Maro
to Michal Bukovjan: Looks like we are leaking a decent amount of memory with Lazarus when painting occurs.…

I'll second that... it does seem to grow, albeit slowly, when you rapidly move the mouse back and forth over the speedbuttons. I went from 40 to 46 megs (with a project open) in about a 10 seconds of waving the mouse. Thank goodness I have a half a gig of RAM! LOL!

Michal Bukovjan wrote 17 lines
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 _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Michal Bukovjan

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

Reply by email