Subject Re: UDF for reading images into a blob.
Author will.honor
> The only problem is it won't
> release the memory used until the connection is dropped.

It turns out that there is no memory leak. I think that the blobs
which are created (albeit temporarily) are getting tied up with
garbage collection.
The file I am retrieving is 179,578 bytes in size. I use the
following sql to retrieve the image 100 times.

Select first 100

The first time I run the query on Firebird 1.5.4, it returns in
500ms. Then, after a commit, The second run returns in 2.5 seconds.
The third and subsequent attempts return in 45 seconds! The same
process on Firebird 2.0.1 shows much better performance. First run =
250ms, second = 2.1 seconds. Third and subsequent = 7 Seconds.
If I drop the connection or do a backup with garbage collection
turned on the times go back to the first run speed.
Do you think this is garbage collection and if it is what can I do
to improve this performance?

Thanks for your help.