function _gcDocuments() {
        getAllOpenDocuments().forEach(function (doc) {
            // Is the only ref to this document its own master Editor?
            if (doc._refCount === 1 && doc._masterEditor) {
                // Destroy the Editor if it's not being kept alive by the UI
                MainViewManager._destroyEditorIfNotNeeded(doc);
            }
        });
    }
Cleans up any loose Documents whose only ref is its own master Editor, and that Editor is not
rooted in the UI anywhere. This can happen if the Editor is auto-created via Document APIs that
trigger _ensureMasterEditor() without making it dirty. E.g. a command invoked on the focused
inline editor makes no-op edits or does a read-only operation.