`input` object - automatic garbage collection for inputs

I am looking for confirmation or denial - my present thinking is that all inputs once created (via UI) stay in input object, there is no destroy procedure (when an input's DOM element disappears, it is still available with its last value in input). There is a change in Shiny 1.14.0 regarding session$destroy() but it seems to be attached only to moduleServer(). In other words, there is no automated mechanism like a garbage collector to remove unused inputs from input.

Based on the following example:
I have a modal (not a part of moduleServer()) with dynamically changed content i.e. - different buttons generate different content of the same modal (Bootstrap) - different set of inputs (ID-s). The modal's close button uses the below code (JS):

const openedModal = e.currentTarget.closest('.modal');
        
        if (openedModal) {
            const modalInstance = bootstrap.Modal.getInstance(openedModal);
            
            if (modalInstance) {
                modalInstance.hide();
            }
        }

Then, other buttons change the content of the same modal. My question - the closing mechanism above and the fact that modal's content is generated each time (can be different set of inputs) have no impact on the input object - once the inputs are created, they stay in input object?