On Sat, 22 Nov 2014 11:27:30 +0000
Martin Frb <[email protected]> wrote:

> Why do you want to pass the record instead of the pointer?
>[...]
> The param could be const/constref instead of pointer.

The patch passes the parameter as const.

> But as the argument is already pointer, why?

Someone may be too lazy to read Append and think Append stores the
pointer instead of copying the content. There was such a case in the
code, creating a mem leak. I fixed that yesterday.
With a "const record" parameter this could not happen. Psychology. ;)

Mattias

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to