Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is the memory???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00291161
Message ID:
00291183
Vues:
20
>VFP 6.0: I have problems with slowdowning the application, when it's running a longer time. I thought it's due to free memory, so I started to watch the sys(1016) function showing the memory used by user objects. I found out, that the amount of used memory is still increasing!
>Here's a simple example - you can try it too:
>
>I started newly VFP 6.0:
>sys(1016) shows 308 012 B.
>I execute m.O=CreateObject("Form") (new empty form)
>sys(1016) now shows 315 172 B. (form takes 7160 B of memory)
>now I do RELEASE m.O or i m.O.Release and then Release m.O, (doesn't matter)
>sys(1016) now shows 309 832 B - so part of used memory was released, but part of it remains used - 1820 B !
>
>Repeating creating and releasing objects (and that's what mostly applications do...), the used memory is still increasing and increasing and application is slowing down and slowing down...
>
>After doing CLEAR MEMO, sys(1016) shows 309768 (still 1756 B is somewhere). I tried also partial CLEARs, but with no effect. Only after CLEAR ALL shows 308 360 - remained only 348 B, but you never achieve the initial value 308 012 B).
>
>The question is: Where is the memory? What can I do to release the memory? Or I miss some setting?
>Help needed. Thanks.
>Petr


Petr,

VFP6.0 (SP3) is very stable and does not leak memory in this fashion. What you might have is what is called dangling references, that is, objects that are instantiated in your form but are not killed when you destroy your form. Also, don't trust the VFP memory functions too much... I also see strange things with SYS(1016), yet my apps are stable.
Another point that might get your attention is the reports, where a bad printer driver might leak memory.

By the way, I was in Prague last August, and enjoyed your city very much.

José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform