?
Solved

A Win32 API function failed

Posted on 1999-01-21
7
Medium Priority
?
2,344 Views
Last Modified: 2012-08-14
Help! I use Delphi 3 enterprise edition. I have an app that can not be run from the IDE. It has to do with memory. The IDE leaks like a sieve after running for a while. I get the error sometimes when I'm trying to alter a graph object. Sometimes the system will get so low on resources that it will lock up my system and I have to hard boot my system. My question is this: Is there a way to increase the memory the IDE allocates for running apps? Has anyone run into this problem? How did you fix this?
0
Comment
Question by:evansj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1362748
Are you sure it is the IDE, and not your own code that is leaking?

Cheers,

Raymond.
0
 

Author Comment

by:evansj
ID: 1362749
Oh, BTW, the app is a database app running under BDE 5.0.
It runs on a P2-300MHZ machine w/64Meg of RAM. I run the BDE off a Novell Network (Netware 4+). I also run VShield, Office Bar, and tape scheduler. So I have removed every thing from memory I could, closed everything I could, and I still get the error when opening certain forms.
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 400 total points
ID: 1362750
OK - some more comments (actually I'll make it an answer...):

You say it is getting low on resources - do you mean resources like window handles? This is a separate issue from low memory. To minimise the amount of resources your app uses here are some tips:

1. Don't autocreate all your forms. Create a form when it is required and destroy it (either by setting Action := caFree in the OnClose or using MyForm.Release).

2. Don't create lots of bitmaps. These suck up handles quickly. See if you can use a TImageList to manage large numbers of same sized and colour depth bitmaps.

3. Make sure you don't hold on to resources such as bitmaps, fonts, brushes etc after you have finished using them.

Delphi doesn't allocate any amount of memory to an app to run in. This is what the OS does. The app is quite free to use all the virtual memory available to the system.

Cheers,

Raymond.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:evansj
ID: 1362751
I have considered this but I have opened the IDE with another delphi app already open and had it go boom without even attempting to run the app. We have several Delphi apps. Depending on which one is open, the IDE sometimes won't open with the app. I have the IDE set up to open with the last app worked. Also, this may be a Win95 thing, but I have opened the IDE and checked the resources. Worked in the IDE and rechecked the resources. Serious use of the resources, typically 3-6% resources left after being in the IDE a while.
0
 

Author Comment

by:evansj
ID: 1362752
I'm sorry Delphi.
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1362753
The IDE itself is going to need to use resources. If there are not enough available then it won't run.

NT is a completely different story as its resource limitations are much, much higher than Win95's and is a much better platform to do the development on...

Cheers,

Raymond.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1362754
Bought This Question.
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question