Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EXE memory leaks?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
EXE memory leaks?
Miscellaneous
Thread ID:
00242407
Message ID:
00242407
Views:
57
Using VFP 5.0 with any OS (NT/95/98), and regardless of installed memory I experience a terrible amount of memory loss when opening forms. I'll try to explain:

I have added, for debugging purposes, some code at the end of the forms Init that shows, in the status bar, the time it took to open the form and the values of SYS(1016) and SYS(1011).

When a form is run from the command window, the behavior is as expected: the first time the form is opened it takes longer that the successive runs (on complex forms up to 3 times as much) and the values reported by sys(1016) and sys(1011) are always the same.

When the same forms are launched at runtime the time needed to open the form keeps increasing steadily and so does the memory usage. On a very complex form the value returned by sys(1016) increases by 300K after each run. Needless to say that it's only a matter of time before the whole thing crashes.

Forms, reports, batch procedures are started through a macro. My menu system goe more or less like this: The menu is contained in a table that vaguely resembles VFP menus. The top menu is built from this table. For each menu selection there is a line built approx like this:
			lSel = "oDS.DoMenuSelection('" + msucode + "')"
			define bar mord of ("_" + alltrim(mparent)) prompt alltrim(mdes)
			on selection bar mord of ("_" + alltrim(mparent)) &lSel			
oDS.DoMenuSelection retrieves the data relative to the choice passed as the parameter (msucode is a unique key on the menu table) and based on this data builds a macro on a variable named lCommand. Then it's a simple DO &lCommand or simply &lCommand and the routine ends.

Any reason why a system like this should cause such a memory leakage?

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform