Apex 19.2. I have an app that uses collections that in some cases can contain millions of rows. I understand that collections are automatically purged when the session ends.
However, because of how the overall application suite is structured (main app that has a menu that calls other apps) when exiting the app the session does not end. What we finding is that if the app is viewed with a large number of records in the collections, the user exits the app out into the main app menu and then returns to the application, it is very slow to load. It acts as if it is holding onto the data in the collections. So I would to be able to ensure that when the user exits the app everything is purged so that they will have a clean slate so to speak when they return to the app.
Any suggestions on how this can be accomplished? I have tried a page unload dynamic action to delete the collections but that does not appear to work.