Jump to content
Software FX Community

Chart.Export not releasing memory?


Recommended Posts

Apologies if this question is asked elsewhere, but I could not find it.

I am currently using ChartFX Client/Server v6.2 in a VB6 application for WinXP. Part of the design is to use the Chart.Export functionality to place an image of the chart into the clipboard so that I can programatically paste the image into a power point slide. I am using this code to accomplish this:

Call cfx.Export(FileFormat_Bitmap, Empty) 'Puts a bitmap of the chart into clipboard


Set pptShape = pptSlide.Shapes.Paste 'Pastes the image into a precreated ppt image object.

The exporting and the pasting works perfectly, but I have a problem with memory management that seems to revolve around using the export. Every time I call the Export line, my machine's RAM will take about 5 MB of data. Doing this in the dev environment, rewinding a line and recalling this Export call will continue to add 5 MB into memory. I've tried using VB.Clipboard.Clear, system calls to clear the clip board, and a handful of other calls that I thought might force a garbage collection. From everything I can tell, the clipboard is supposed to release resources as they're overwritten with different copies, so I am at a loss as to whether the problem is with how I am copying these to memory or if I should be doing something different with the clipboard. The only thing that seems to clear the memory is completely closing out the dev environment/executable.

As some 'modes' of the application will allow several dozen charts to get exported and put into power point, this can be quite the memory hog. I would appreciate any assistance that can be offered with this.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...