Memory management when changing the visibility between two data widgets using a switch without a microflow
Hello everyone, I am developing a project in which a page requires conditional visibility between two different data widgets using a switch. I have implemented in a way where the domain model has an entity called “CondVisibility” with an attribute called "ListView” which by default is a true boolean value. The page that requires the conditional visibility contains a switch, a data grid and a template grid. When a user accesses the page, the CondVisibility object is created. Navigation shown here: The switch changes the value of the ListView bool when toggled: According to this, data is displayed either using a data grid if the value is true or a template view if the value is false: My question is- is the object that was created deleted each time the user navigates away fro the page? That does not seem to be the case here since a data grid that is configured to show ListView objects doesn’t show any even after accessing the page many times. It was brought to my attention that this would usually be done using a microflow that checks if the object has already been created first to avoid creating an excess amount of objects.
Liga Evelina Liepina
Change the persistent object CondVisibilty to a non persistent object. Then you do not have to worry about it.