Subject Re: [firebird-support] How do i make my UDF Thread/Multiuser Safe ?
Author Ivan Prenosil
> can allocating new memory and freeing it with FREE_IT make my udf
> thread/multiuser safe or i'll have to use Critical Section ?
>
> can following function be said thread safe ?
>
> Function TrimProper(AStr:PChar):PChar;
> Var
> I,L: Integer;
> begin
> L := StrLen(AStr);
> Result := StrAlloc(L);

You have to use ib_util.dll to allocate memory that will be freed by FREE_IT.

e.g.
function ib_util_malloc(size: LongWord): Pointer; external 'ib_util.dll';

Ivan
http://www.volny.cz/iprenosil/interbase/