On 9/21/21 2:50 PM, Adriano dos Santos Fernandes wrote:
I think we can improve things here.

We have our GlobalPtr, InitInstance and we may continue using them. And
we have FB_NEW which allocates memory from the global default pool.

We may split that global default pool in two, so we'll have another
default pool for external (not controlled by us) libraries. All memory
allocated directly with "operator new" (not FB_NEW) will go to external
pool.

And external pool will not be cleaned up on exit. Like we already have
with ICU memory.

Of course we didn't intend to have all external code cleaning things and
we leak that pool structures, so it may have some special things. Once
we are destructing it if there is no memory allocated from it anymore,
it must be completely freed.

Since it's a different pool, we may debug it and understand better how
the libraries we're using are doing with it.



This should work. There may be minor issues with implementation but in general I like this idea.





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

Reply via email to