Subject Re: [ib-support] FreeUDFLib and IB6.0 memmory leak problems
Author Claudio Valderrama C.
""Luciano Sparacino"" <lsparacino@...> wrote in message
news:003601c1c9d0$96aa5390$6d0001c5@......
> 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.

You'll find that most problems are not related to FREE_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.

The article is bogus because it was written by an ignorant. First, IB5 and
IB6 were compiled with MSVC and Firebird is still compiled with MSVC.
Probably IB6.5 was built with MSVC, as TeamB acknowledged that IB compiled
with BCB simply crashes. So, there's no "other compiler". Where did that
person get wind of another compiler in the party?

Second, if you follow the guidelines to allocate memory inside the UDF in
case you really need to, FREE_IT will work. MSVCRT.DLL guarantees that. Even
if you write the UDF in Delphi. But you should follow the guidelines. The
tiny ib_util.dll is made for that purpose, use it! Using it causes an
equivalent effect than using Borland's shared memory manager to handle the
heap in programs and DLLs made with Delphi in a compatible way.

Third, you seem to be same person quoted in the original email that Ann
Harrison sent me asking for the same issue. I've built a complete
demonstration and a long explanation for her. Maybe I should post it there,
too.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing