On 19 Nov 2009, at 11:21, Alexander Klenin wrote:

On Thu, Nov 19, 2009 at 19:20, Martin <laza...@mfriebe.de> wrote:

Jonas Maebe wrote:

[skipped example]

Well in this case, the code is actually positively affected by the "out"
param (because it avoids the mem leak)

Jonas, can you confirm that your example is incorrect one,
and Martin's example below is actually what you meant?

Why do you think my example is incorrect? It currently runs without a memory leak, and would result in a memory leak if the semantics of "out" would be changed from "parameters are automatically finalized at the caller side" into "no finalization is performed".

You did ask for an example where changing the semantics of "out" would change the behaviour of existing code, didn't you?


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to