Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MEMORY PROBLEM. Having a program wh

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
0
0
GB
MEMORY PROBLEM. Having a program which uses up to 20 forms. Once you are at the end of this program all the forms are released. However this does not release the memory. Therefore we rapidly run out of memory, any ideas?
 
Hi!

Try sys(1104) function. It is not documented in VFP, but documented at the fox.wikis.com and MS site - Q269284. I don't know other ways to do this.

Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Vlad:

You suggest me that sys function too, but don't work, and i still have that problem.
May be i don't use properly, please tell me if the way to use is this:

SYS(1104)
REPORT FORM MyReport PREVIEW

Thanks

Dario
 
Hi!

Use it after report form command to purge unused buffered memory.

In addition, do you use any OLE objects in the report? They might cause individual problems.

Maybe it is cause by extensive use of object refernses together with RELEASE command? I don't know exactly.

From my experiense, I never met such problem. Once my customer screamed too that my VFP application grows during running. But than that application ran 2 weeks without interruptions (it was background service) and nothing happened - no memory overflow. This does not mean that I'm programming superior or something like that, I just never met it yet.


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
I've tried sys(1104) unfortunately it has not worked. The program in question allows clients to scroll between screens, backwards and forwards. Once they have completed there transaction we revert to the start screen, releasing all other screens. However NT Tsk Manager indicates that the memory is still being used. Have we any other suggestion, please.
 
Hi!

When you work with objects extensively, check if you release all objects correctly. Specially, I recommend to set Visible property of control to .F. when you remove it in run-time. In addition, when you added objects in run-time using AddObject method, always remove all such objects when finished manually using RemoveObject method.

I have no other ideas so far...


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
I've had similar problems with forms not getting released because I assign the form object to a public variable, and forget to release the variable, such as:

public my_thisf
my_thisf = thisform

even though you release the form, the my_thisf variable still keeps the form from being released.

my_thisf.visible = .F.
release my_thisf

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top