by IDEAL Software Support » Fri Jun 17, 2011 12:24 pm
All memory used by a VPE document is freed, when a document is closed. For example the Chart Data object - which can be used for multiple chart objects within the SAME document - is reference counted and deleted automatically.
Exceptions:
- Picture Cache
Images in the Picture Cache are deleted, when the last instance of the same process unloads VPE. Therefore images are held in the cache, when you close a document. If you open a new document (or simultaneously additional documents, for example in multi-threaded applications), all documents share the same cache within the same process. This speeds up processing a lot!
Note: each process creates its own cache, which is not shared between different processes. But is is shared between different threads or document instances of the same process.
- (Memory-) Streams
For all created streams, you need to call Stream.Close() explicitly. This is so, because this way streams can be used for different documents without re-creating the streams.