[fpc-devel] Redefine FillChar() to use out parameter instead

Thaddy thaddy at thaddy.com
Thu Nov 19 11:39:25 CET 2009


Jonas Maebe wrote:
>
> If you change the behaviour of "out" so that such parameters are no 
> longer finalised before the routine is entered, then the above will 
> cause a memory leak. You can verify this by changing the "out rec" 
> parameter into "var rec".
>
Then this is definitely not a sextopod but an octopod. (really serious 
bug) The "out" should behave like "var" + referencecount and 
finalization outside the procedure or function.



More information about the fpc-devel mailing list