The loadDocument API internally uses the closeDocument API to make sure that things such as DOM elements, event listeners and any other forms of memory consumers related to the current document will be cleaned up before loading another document. This means that there is no need to explicitly close a document beforing loading another one. However, you may want to call closeDocument to keep the memory usage low while still showing the UI if no documents should be loaded currently.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales