Memory allocation in VPE

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Memory allocation in VPE

Postby dpr » Thu Jun 16, 2011 1:44 pm

When executing CloseDoc() does this action free the handle (and therefore the memory needed by ChartDataCreate() )??

If not how does one free this memory?
dpr
 
Posts: 1
Joined: Tue Jun 14, 2011 9:15 pm

Re: Memory allocation in VPE

Postby 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.
IDEAL Software Support
 
Posts: 1622
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 69 guests