Adds this backtrace into the set of backtraces related to some object reference counting issues debugging.
This is usually called inside @ref and unref. If the backtrace corresponds to a unref call, and a corresponding @ref backtrace is found in the current list, then the previous backtrace is removed and this one is skipped.
Any left backtraces in the list are printed at the application end.
A convenient function debug_ref_unref_push_backtrace_for_object is provided too.
backtrace |
a backtrace to push, taken from debug_get_backtrace |
object_ref_count |
the current object reference count when the push is done |