Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loosing memory from excel object.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00200020
Message ID:
00200024
Vues:
13
>I´ve found that accessing the pagesetup object of an excel application uses some memory wich is not released after closing the excel object.
>
>Try this:
>1. Check the amount of memory available (setup - control Panel - system - performance)
>2. run the following code
>
>MyExcel = CreateObject("Excel.Application")
>MyExcel.WorkBooks.Add()
>MyExcel.ActiveSheet.PageSetup.CenterHeader = "MY HEADER "
>MyExcel.ActiveWorkBook.Close(.F.)
>
>3. Check the available memory again (it´s decreased in about 2 - 4%)
>4. Run the code again except for the 3rd line
>3. Check the available memory again (it´s NOT decreased from last check)
>
>How could I put a header on my excel object programmatically without loosing memory?
>
>Thanks for any help.

You have not released excel is the reason that you are losing mem. Just closing the book does not automaticly release it.

Try
release MyExcel

That should bring back your mem

HTH
Jeff

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform