You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our library (using harfbuzz internally) exposes memory callbacks to our clients to implement custom allocators and leak detectors.
We also expose a Finalize point in the library where all allocations not released are counted as leaks.
Harfbuzz is doing a few allocations that are expected to be freed at atexit time (or never, depending on the implementation). These allocations count as leaks in our library. To solve this, we modified Harfbuzz to allow pre-defining hb_atexit (before hb.hh defines it).
We redefine hb_atexit to push each function into an internal list. These functions are manually invoked at Finalize time.
The changes to the code are very simple, not sure if aligned with the design of the library but I would love to have this upstream.
Our library (using harfbuzz internally) exposes memory callbacks to our clients to implement custom allocators and leak detectors.
We also expose a Finalize point in the library where all allocations not released are counted as leaks.
Harfbuzz is doing a few allocations that are expected to be freed at atexit time (or never, depending on the implementation). These allocations count as leaks in our library. To solve this, we modified Harfbuzz to allow pre-defining hb_atexit (before hb.hh defines it).
We redefine hb_atexit to push each function into an internal list. These functions are manually invoked at Finalize time.
The changes to the code are very simple, not sure if aligned with the design of the library but I would love to have this upstream.
The text was updated successfully, but these errors were encountered: