From: Ann W. H. <aha...@ib...> - 2001-05-29 15:59:02
|
> >I wrote: > > However, I suspect there's no issue, since both the input and output > > descriptors are allocated by the caller. UDF's have to allocate > > space when they're creating strings. At 08:43 PM 5/28/2001 -0400, Claudio Valderrama C. wrote: >Who is responsible for deallocating descriptors? The problem free_it tried >to solve (and actually ended up creating other issues) was that in some >place, the string created by the UDF has to be freed. Right. If you ask a UDF to return an arbitrary length string, it will allocate space for the string and the caller (Firebird) must know enough to release that space because the UDF isn't coming back to do it. However, descriptors are fixed length thingies, allocated by the caller (Firebird), so the caller (Firebird again) can be expected to clean them up. Regards, Ann www.ibphoenix.com We have answers. |