Subject Re: [ib-support] FreeUDFLib and IB6.0 memmory leak problems
Author Helen Borrie
At 07:56 PM 08-03-02 -0300, you wrote:
> Has anybody had any problem with IB6.0 or FB and FreeUDFLib.dll? I'd
> like to see how to deal with it without just stop using it.
>
> I've found an article that says it has problems with IB6 but not in
> IB5.x since IB5.x is compiled with MSVC++ and IB6.0 is compiled with
> another C compiler. So memory allocation is different for the UDF and
> the FREE_IT keyword are subject to memory leaks.

FreeUDFLib for the Windows servers was written in Delphi. A fixed version
is available from Claudio's website (http://www.cvalde.com)

The Unix/Linux version is a (somewhat unsuccessful) Delphi-to-C++
translation by a Borland Team B member, which he released to the community
**for testing** more than a year ago. So, if you are using the Linux
version, think of yourself as a tester. :))

I've never seen the source code for the Linux translation and, in fact, the
original download seems to have disappeared too...seems to suggest that
it's not in active development. If it's any help, the FreeUDFLib kit from
Claudio's site has the latest Delphi source, so it might be possible to do
something with it using Kylix; or to do a new translation into C.

> I'm wondering if this applies to FB too.

You can safely assume that any UDF that causes memory problems with IB will
also cause the same problems with Firebird. It's a platform issue. The
database engine has no control over what happens in UDFs, so it is up to
the UDFs to do their own cleanup. I simply don't know whether Free_It is
compliant with memory de-allocation rules on Linux. If Rob disabled
Free_It in his translation to C and Linux, then it sounds like a quick fix
for incompatible code...still, that's assumption, since the "article" you
refer to is actually just a newsgroup posting, out of any platform context...

fwiw, it's an excellent rule, when you post support questions, to inform us
of the platform on which you are encountering problems.

regards,
Helen

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________