[Lazarus] Need testers for the a new debugger
Martin Frb
lazarus at mfriebe.de
Sat Nov 22 12:27:30 CET 2014
Why do you want to pass the record instead of the pointer?
The pointer is valid during the entire call (inside Append).
Append does not store the pointer, but a copy of the data. So this is save.
Passing the pointer saves the need to pass the entire record by value
(or in other word, to make a mem copy (or registers) of the entire
record) when passing to the function.
Which would meant that the data would be copied twice, as it is once
copied in inside the Append function anyway.
The param could be const/constref instead of pointer. But as the
argument is already pointer, why?
Please mail how to get the mem leak, and why this fixes it.
On 22/11/2014 06:14, Flávio Etrusco wrote:
> On Fri, Nov 21, 2014 at 10:33 PM, Mattias Gaertner
> <nc-gaertnma at netcologne.de> wrote:
>> On Fri, 21 Nov 2014 23:51:13 +0100
>> Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
>>
> (...)
>> Without the AVs you can see the mem leaks. I fixed the three mem leaks.
> Here's a patch to change the Append method, just in case ;-)
>
> Best regards,
> Flávio
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141122/d8a9f982/attachment-0003.html>
More information about the Lazarus
mailing list