Subject UDF Library memory management
Author ben_daniel81
2 questions:

1. When do udf libraries get unloaded by firebird (1.5.x)?

2. Does each thread in firebird (1.5.x) load it's own instance of a
UDF library?

I ask because I want to write a UDF library which works with Delphi's
TStrings so I can use a TStrings object in a stored procedure by
making UDF calls. E.g. I would have a UDF to create a TStrings and
return a handle to the object, then I'd pass that handle into other
UDF calls to work with the object, like UDF_AddStringToList(:Handle,
:MyAccount), UDF_RemoveStringFromList(:Handle, :MyAccount), etc.

But for this to work, I'd need the UDF library to stay loaded in
memory for the duration of my stored procedure's execution - hence
question 1. And if each thread loads it's own instance of the UDF
library then I don't have to worry about making it thread safe, hence
question 2.

Thanks in advance,
Ben