Sign in Join

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

Mailing lists / fpc-pascal / 2003-04

mem leak in FCL

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner

Hi there,

I have spottet a mem leak in fcl/inc/cregist.inc.
When registering a component the ComponentPages variable is created, but never freed.
I would like to add a procedure FreeComponentPages, which is called in the finalization.
Should I send a patch?

Mattias

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 8 lines
Hi there, I have spottet a mem leak in fcl/inc/cregist.inc. When registering a component the ComponentPages variable is created, but never freed. I would like to add a procedure FreeComponentPages, which is called in the finalization. Should I send a patch?

Yes, please.

Michael.

Mattias Gaertner
to Unknown author
Show quoted text 14 lines
On Fri, 18 Apr 2003, Mattias Gaertner wrote: > Hi there, > > I have spottet a mem leak in fcl/inc/cregist.inc. > When registering a component the ComponentPages variable is created, but > never freed. > I would like to add a procedure FreeComponentPages, which is called in > the finalization. > Should I send a patch? Yes, please.

On a second thought, a simple ComponentPages.Free and a TComponentPage.Destroy look better. Patch is attached.

Mattias

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 20 lines
On Fri, 18 Apr 2003 20:46:22 +0200 (CEST) wrote: > > > On Fri, 18 Apr 2003, Mattias Gaertner wrote: > > > Hi there, > > > > I have spottet a mem leak in fcl/inc/cregist.inc. > > When registering a component the ComponentPages variable is created, but > > never freed. > > I would like to add a procedure FreeComponentPages, which is called in > > the finalization. > > Should I send a patch? > > Yes, please. On a second thought, a simple ComponentPages.Free and a TComponentPage.Destroy look better. Patch is attached.

Applied.

Michael.