Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Delphi Language
Expertise: Beginner
Feb 2, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Out of Memory errors in Delphi 2.0

I am working on my first Delphi 2.0 application which has grown to be quite large over the past few months. The problem is that lately I have been getting "Out of Memory" errors whenever I run my application. Even the smallest of things will make this message come up. I then have to shut it down to restart again. To give some background, I have a datamodule form in which is contained all my TTable components. These components are active when the application starts. I suspect I have about 30 of them. I have already started setting their Active property to false and opening them only when needed thinking that this could be the cause of the problem. The problem still persists.

Also, in the options menu of my project, I auto-create quite a few form. Could this cause the problem.

Thanks for your help in advance. Pourang

A lot of things can affect memory resources. So I can't point to one particular thing. However, here's some stuff that you should consider:

1) If you've got a lot components dropped onto your form, you're asking for trouble because you use up stack space. Besides, if you've got an incredibly crowded form, you should rethink your interface design. It confuses users.

2) Make sure that you release resources such as data access components, files, etc., as soon as you're done with them. Especially during testing when you're doing continuous execution of your programs, releasing resources is vital.

3) If none of the above apply, it's possible that you have an error in your VCL or one of your Delphi files has a memory leak due to some corruption. You might consider re-installing Delphi

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date