<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Why do you want to pass the record
instead of the pointer?<br>
<br>
The pointer is valid during the entire call (inside Append).<br>
<br>
Append does not store the pointer, but a copy of the data. So this
is save.<br>
<br>
<br>
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. <br>
Which would meant that the data would be copied twice, as it is
once copied in inside the Append function anyway.<br>
<br>
The param could be const/constref instead of pointer. But as the
argument is already pointer, why?<br>
<br>
Please mail how to get the mem leak, and why this fixes it.<br>
<br>
<br>
On 22/11/2014 06:14, Flávio Etrusco wrote:<br>
</div>
<blockquote
cite="mid:CAJvBmOYqGB9kUJgR22dNRgSV=ytverjeLaPx3Wzm8OTx32yjdQ@mail.gmail.com"
type="cite">
<pre wrap="">On Fri, Nov 21, 2014 at 10:33 PM, Mattias Gaertner
<a class="moz-txt-link-rfc2396E" href="mailto:nc-gaertnma@netcologne.de"><nc-gaertnma@netcologne.de></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Fri, 21 Nov 2014 23:51:13 +0100
Mattias Gaertner <a class="moz-txt-link-rfc2396E" href="mailto:nc-gaertnma@netcologne.de"><nc-gaertnma@netcologne.de></a> wrote:
</pre>
</blockquote>
<pre wrap="">(...)
</pre>
<blockquote type="cite">
<pre wrap="">Without the AVs you can see the mem leaks. I fixed the three mem leaks.
</pre>
</blockquote>
<pre wrap="">
Here's a patch to change the Append method, just in case ;-)
Best regards,
Flávio
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
_______________________________________________
Lazarus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
</pre>
</blockquote>
<br>
</body>
</html>