Subject Re: [firebird-support] UDF argument "by descriptor FREE_IT"?
Author Dmitry Yemanov
Martijn Tonies wrote:
>
> Is it possible to use BY DESCRIPTOR FREE_IT on a UDF argument?

Yes.

> If so, how does this work internally? I thought Firebird is supplying the
> descriptor?

You have to allocate the descriptor with ib_util_malloc(), initialize it
properly, allocate the value the same way, assign its address to
descriptor's dsc_address and finally return the descriptor address from
the UDF. The engine will release both memory pointers after the call.


Dmitry