On Wed, Mar 29, 2023 at 11:43 PM Bart wrote:
> I'll report it in the bugtracker.
https://gitlab.com/freepascal.org/fpc/source/-/issues/40225
I condensed the program even further.
Just concatenating 2 strings in Foo and assigning them to S will be
enough to trigger the memory leak.
--
Bart
___
On Wed, Mar 29, 2023 at 11:44 AM Ondrej Pokorny via fpc-devel
wrote:
>
> FYI: Delphi doesn't create a memory leak.
>
The memory leak seems to be related to string concatenation in the
getter for the Text property.
A getter like this is enough to get the leak:
function TBar.GetTextStr: String;
beg
Hi,
A much more deterministic version would do it as this:
function HiInteger(value: LongInt): LongInt; nostackframe; assembler;
asm
mov r0, r0, asr #16
end;
If you do it with an inline ASM block and without stackframes it becomes
much harder to predict how you need to address variables by n
Hello, I've been having a problem getting some code to compile. I've gone
through the documentation, butthere isn't any specific info for the arm
version. This is a simplified version
Program Test;
Function HiInteger( Value: LongInt ): LongInt;
Begin
Asm
LdR R0, Value
Nice one :) I am also interested in the answer. IMO it is a bug because
the code is valid - https://www.freepascal.org/docs-html/ref/refse10.html
FYI: Delphi doesn't create a memory leak.
Ondrej
___
fpc-devel maillist - fpc-devel@lists.freepascal.o