docs/vendor.js
function storeCleanupFn(view, cleanupFn) {
    getCleanup(view).push(cleanupFn);
    if (view[TVIEW].firstTemplatePass) {
        getTViewCleanup(view).push(view[CLEANUP].length - 1, null);
    }
}
function storeCleanupFn(view, cleanupFn) {
    getCleanup(view).push(cleanupFn);
    if (view[TVIEW].firstTemplatePass) {
        getTViewCleanup(view).push(view[CLEANUP].length - 1, null);
    }
}
function storeCleanupFn ( view , cleanupFn ) { getCleanup ( view ) . push ( cleanupFn ) ; if ( view [ TVIEW ] . firstTemplatePass ) { getTViewCleanup ( view ) . push ( view [ CLEANUP ] . length - 1 , null ) ; } }
Saves the cleanup function itself in LView.cleanupInstances.

This is necessary for functions that are wrapped with their contexts, like in renderer2
listeners.

On the first template pass, the index of the cleanup function is saved in TView.
Saves the cleanup function itself in LView . cleanupInstances .