Subject Re: Memory Usage Test
Author jssahdra
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
> > This is the udf which comes with the firebird distribution
(fbudf). I
> > have verified the fbudf.sql. It is not declared with FREE_IT. I
tried
> > using FREE_IT, but then it stops working (it simply hangs).
> >
> > JS
>
> Interesting: I use the old freeudflib and this is the typical DDL
> DECLARE EXTERNAL FUNCTION F_ADDMONTH
> DATE,
> INTEGER
> RETURNS DATE FREE_IT
> ENTRY_POINT 'AddMonth' MODULE_NAME 'FreeUDFLib.dll'
>
> I've never seen memory leaks with these functions. You could have
found
> something there.
> Alan

This the declaration

--FBUDF_API ISC_TIMESTAMP* addDay(ISC_TIMESTAMP* v, int ndays)
declare external function addDay
timestamp, int
returns timestamp
entry_point 'addDay' module_name 'fbudf';

I have looked at the source code also. There is nothing, which can
cause memory leak.

FBUDF_API ISC_TIMESTAMP* addDay(ISC_TIMESTAMP* v, const int& ndays)
{
v->timestamp_date += ndays;
return v;
}

Is there a way that somebody else can do a test for this ??

JS