[lazarus] More compiler problems discovered
Markku Niskanen
markku.niskanen at laatumikro.fi
Fri Aug 20 13:56:48 EDT 1999
The compiler seems to have trouble with property
assignments. I found this behaviour when debugging
the editor crashes. When you set a property
as in the Lazarus editor MouseDown function
<snip>
Timer1.Enabled := False;
CursorVisible := False;
CursorPos.X := (CharacterWidth * (x div CharacterWidth));
CursorPos.Y := (CharacterHeight * (Y div CharacterHeight));
Timer1.Enabled := True;
<snip>
Every click of the mouse on the editor workarea
seems to eat 32 bytes of available memory. This
is caused by the lines that access Timer properties:
Timer1.Enabled := True;
Timer1.Enabled := False;
I have examined this behaviour thoroughly and
I am pretty sure that the property assignment is
the guilty one.
IF you triple the number of lines (so that the behaviour
stays the same), the memory onsumption will go to
64 bytes. I have not tested it anywhere else but in this
very case. I have no idea where these bytes go but it has
something to do with the property assignment code.
Now that there are two severe memory leaks the editor cannot
be coded any further as it crashes almost instantly.
Markku
--
markku.niskanen at laatumikro.fi
More information about the Lazarus
mailing list