invokeOnDestroy

Attaches a callback handle to the lifecycle which will be invoked when destroy is called.

See also