Hi all, I have an architecture for a Shiny app in mind, but I'm wondering if it'll cause memory leaks, as I'm not 100% sure of Shiny's own under-the-hood architecture for this.
I have a (trivial, for the sake of example) renderUI function, like so:
output$dynamic_ui <- renderUI({
## the design of this input element itself takes a reactive dependency on another element
radioButtons("radio_input", "some title", choices = input$checkbox_group_input)
})
My guess is that the same reactive element (input$radio_input
) will continue to get re-defined, and its name serves as a unique identifier for these (potentially frequent) redefinitions.
A possibility, however, is that under-the-hood there's an additional new unique identifier assigned each time a reactive element is constructed and each successive call to the renderUI
function adds to a growing list of (mostly hidden) reactive elements ... which is effectively a type of memory leak.
Any idea if my guess is correct, and the total number of reactive elements held in memory doesn't grow each time renderUI
would be called?