Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Garbage Collection - Any Ideas?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00464933
Message ID:
00465128
Views:
13
Thanks to everyone for their help. The sys(1104) + SYS(3050) combination seems to have fixed it. The app will spike to 12MB at max, then the SYS(1104) fires off and it falls again to around 5MB. Much better than the 80MB each app was consuming and hogging to itself before the SYS(1104) + SYS(3050) combination.

Interestingly, it seems you can also mimick the SYS(1104) by creating a
simple form object, then releasing it.

x = space(16777184) ' VFP allocates between 20-36meg of RAM
Release x ' RAM stays allocated

y = createobject('FORM') ' Does Garbage Collection..
release y

So In my application, I put a SYS(1104) after the larger reports and
queries, and it seems to have done the trick.

Thanks for all the input, it helped greatly!
-Ed


>>I'm hoping someone knows how to force VFP to do garbage collection.
>>For example, on an NT machine with task manager watching the VFP memory allocated, I type:
>>
>>x = space(16777184) ' VFP allocates between 20-36meg of RAM
>>x = Null
>>Release x ' RAM stays allocated
>>
>>CLOSE ALL
>>CLEAR ALL ' No luck - still allocated
>>
>>Is there any way to force memory allocation? SYS(3050) has
>>no effect on this kind of memory allocation.
>>
>>We have a citrix box with many VFP apps running, and if one
>>user runs a VFP routine which needs RAM, the RAM is staying
>>allocated to that user indefinitely, slowing the other users
>>down.
>>
>>If anyone has any insites, I would be very thankful.
>>
>>TIA,
>>Ed
>
>Ed,
>
>There is undocumented function SYS(1104) that may be used to force Visual FoxPro to purge unused buffers as decribed in MSDN KB arcticle Q262284.
>
>http//support.microsoft.com/support/kb/articles/Q269/2/84.asp
Previous
Reply
Map
View

Click here to load this message in the networking platform