To deal with GCed objects that need to run finalization actions as part of being destructed, "prefinalizers" are used.
Class declaration for these will contain USING_PRE_FINALIZER(..) and the constructors are required to explicitly register the object's prefinalizer with its owning thread.
That last bit is manual and easy to forget; we should simplify the prefinalizer model and not require it, but make the registration happen implicitly by declaring USING_PRE_FINALIZER().
Comment 1 by bugdroid1@chromium.org
, Dec 13 2016