Sign in Join

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

Mailing lists / lazarus / 2003-08

Owner and parent must be equal?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Vincent Snijders
to Vincent Snijders: Lazarus has a small memory leak in the compiler options form. I changed line 4388 in…
Show quoted text 14 lines
On Mon, 11 Aug 2003 20:42:05 +0200 Vincent Snijders wrote: > Hi, > > Lazarus has a small memory leak in the compiler options form. > > I changed line 4388 in CompilerOptions.pp to: > edtUnitOutputDir := TEdit.Create(grpUnitOutputDir); > i.e. making the owner equal to the parent groupbox. > Since it was solved then, I didn't research further, why the owner > and the parent of a control in a GroupBox need to be the same. It does not.

Didn't thinks so either.

Show quoted text 8 lines
> Normally > grpCompiler is destroyed (almost) at the same time, so why doesn't > it the edtUnitOutputDir? When edtUnitOutputDir was created, the old "owner" grpCompiler was not yet created (i.e. nil).

Thanks for explaining. I now understand.

Vincent.

Reply by email

Vincent Snijders

Hi,

Lazarus has a small memory leak in the compiler options form.

I changed line 4388 in CompilerOptions.pp to:

  edtUnitOutputDir := TEdit.Create(grpUnitOutputDir);

i.e. making the owner equal to the parent groupbox. Since it was solved then, I didn't research further, why the owner and the parent of a control in a GroupBox need to be the same. Normally grpCompiler is destroyed (almost) at the same time, so why doesn't it the edtUnitOutputDir?

Regards,
Vincent.

Reply by email

Mattias Gaertner
to Vincent Snijders
Show quoted text 9 lines
Hi, Lazarus has a small memory leak in the compiler options form. I changed line 4388 in CompilerOptions.pp to: edtUnitOutputDir := TEdit.Create(grpUnitOutputDir); i.e. making the owner equal to the parent groupbox. Since it was solved then, I didn't research further, why the owner and the parent of a control in a GroupBox need to be the same.

It does not.

Normally grpCompiler is destroyed (almost) at the same time, so why doesn't it the edtUnitOutputDir?

When edtUnitOutputDir was created, the old "owner" grpCompiler was not yet created (i.e. nil).

Fixed.

Mattias

Reply by email