21.06.2021 21:55, Adriano dos Santos Fernandes wrote:

I'm testing with the example function:

create function sum_args (
     n1 integer,
     n2 integer,
     n3 integer
) returns integer
     external name 'udrcpp_example!sum_args'
     engine udr;

select sum_args(1, 2, 3) from rdb$database where 1 = 0;

I put breakpoint in UdrEngine.cpp here:

        ~SharedFunction()
        {
                engine->deleteChildren(children);
        }

And engine calls it.

Can you do the same test using sum_args?

  I just tried it with v3 and it doesn't call nor ~SharedFunction(), nor
ExtEngineManager::Function::~Function(), nor Jrd::Routine::~Routine().

  Than I found that it was fixed in v4 with PR168 but never backported into v3.

  What was not fixed and still leaks memory in v4 - is few metadata instances
incorrectly counted at ExtEngineManager::makeFunction() and 
ExtEngineManager::makeProcedure().

  Fix is committed into v4.0-release. Jiří could you try next build and report 
here ?

Regards,
Vlad



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to