dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


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

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Out of Memory errors in Delphi 2.0

Question:
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

Answer:
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.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date