On 30.08.2019 19:20, Adriano dos Santos Fernandes wrote:
On 30/08/2019 08:56, Dmitry Yemanov wrote:
27.08.2019 3:59, Adriano dos Santos Fernandes wrote:
Sometimes a object managed by memory-pool may embed non-pooled memory or
other resources.

If the main object is not explicitly destroyed, i.e., destroyed by pool,
the embedded objects leak.
True. And this requires us to avoid the "delete-by-pool" practice and
destroy such objects explicitly. Which is usually good per se, unless
performance is affected (e.g. millions of small objects inside the pool).

And such objects may be embedded in some container with million objects.

As far as I understand complex request with regular expression is exactly such object.

Small pieces (classes) should have own defined behavior that always
works, but currently it's impossible as we don't known where a well
defined small piece will be used.

Currently the request should handle that explicitly, which is bad. With
the finalizers, classes may work in both situations (delete or delete by
pool).

Certainly it's much, much better to define rules of object deletion at construction time than to delete something explicitly (here and there) when object is going to be destroyed.






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

Reply via email to