Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing Memory when using the RDC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Releasing Memory when using the RDC
Divers
Thread ID:
00750515
Message ID:
00750515
Vues:
78
I do something like the following to allow the user to view a Crystal Report (where mytable is a variable holding a temporary file name like g:\temp\tmp3293482.dbf):
crApp=createobject("crystalruntime.application")
crReport=createobject("crystalruntime.report")
crReport=crApp.openreport(v_crfile)
crReport.Database.Tables.Item(1).Location=mytable
crReport.ReadRecords

Then I use the CR Viewer to view it:
DO FORM vw_cryst
WITH vw_cryst
.addobject('crviewer1','olecontrol','crviewer.crviewer')
WITH .crViewer1
.height=vw_cryst.height
.width=vw_cryst.width
.EnableExportButton=.T.
.Visible=.T.
.reportsource=crReport
.ViewReport
=MESSAGEBOX("Processing completed. You may view, print, export. . . yada yada")
ENDWITH
ENDWITH

The client noticed that the memory would go from something around 20 megs of use to around 211 megs while a user was viewing the report. The disturbing thing is, it's not clearing the memory once the user exits out of the screen. So I added to the Destroy event of vw_cryst:
RELEASE crApp, crReport
which didn't work, so out of desparation:
crReport=[]
crApp=[]
RELEASE crApp, crReport

Which also didn't work. Why isn't it releasing the memory?

Thanks in advance,
Joy
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform