Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Culbertson
  Where is Paul Culbertson?
 Katy
 Texas - United States
 Paul Culbertson
 To: Mike Coleman
  Where is Mike Coleman?
 Fairfax
 Virginia - United States
 Mike Coleman
 Tags
Subject: RE: Good Cleanup code needed for main prg
Thread ID: 291 Message ID: 297 # Views: 5 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, May 22, 2001 10:15:05 AM         
   


> I have noticed that my app is not releasing all of the mem used after it is closed. I have reviewed my cleanup code, and feel that it is very crude. Can someone please forward me a copy of a solid cleanup procedure to put in my main app that will release all memory used by VFP, and return the windows environment to the way it was before the app launched. My Windows knowledge is less than adequate, therefore I hope some of you guys can help me out!
>
> Thanks in advance.
>
>
>
>
>
>
> I'm not a programmer... but I did stay in a Holiday Inn Express last night!

Hey Mike,

There are alot of ways to cleanup after running but there are a few things that I need to know. Are you running your code in a application object like TasTrader or from a prg with a do form then read events?

if your running in an application object then releasing the application object should be sufficient as well as a clear events...

if in a prg then something like the following should help or work fine
do myform linked name oform
read events

clear events
close all
release all
clear dlls


Information obtained by Doug Hennig's Article in FoxTalk not sure which month but article is called "Language Enhancements in VFP 7, Part 5"

Technically, SYS(1104) isn't new (I'm not sure which release it was added in), but in VFP 7, it's finally documented. This function purges memory cached by programs and data. According to the Help file, "You can improve performance by calling SYS(1104) after executing commands that make extensive use of memory buffers."


Hope this helps shed some light.

Paul Culbertson

Houston, TX


ENTIRE THREAD

Good Cleanup code needed for main prg Posted by Mike Coleman @ 5/22/2001 9:02:17 AM
RE: Good Cleanup code needed for main prg Posted by Paul Culbertson @ 5/22/2001 10:15:05 AM