[fpc-devel] ref count issue with out param
Michael Van Canneyt
michael at freepascal.org
Sat Jun 13 18:15:04 CEST 2015
On Sat, 13 Jun 2015, Michael Van Canneyt wrote:
>>
>> In my example the out param is fine too, but the other param (that gets
>> passed the same param on the callee side) is dangling.
>
> Normally only if the initial reference count was 1.
>
> And now you know why reference counts can be dangerous and bite you in the
> lef:-)
>
> But I will see if I can document the case.
Turns out it was already documented, but not yet on the website.
There is a section devoted to managed types and reference counts.
I added my sample program, will see about concocting a simple version of yours.
Michael.
More information about the fpc-devel
mailing list