• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2620
  • Last Modified:

A Win32 API function failed

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
evansj
Asked:
evansj
  • 3
  • 3
1 Solution
 
rwilson032697Commented:
Are you sure it is the IDE, and not your own code that is leaking?

Cheers,

Raymond.
0
 
evansjAuthor Commented:
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
 
rwilson032697Commented:
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
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
evansjAuthor Commented:
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
 
evansjAuthor Commented:
I'm sorry Delphi.
0
 
rwilson032697Commented:
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
 
MirkwoodCommented:
Bought This Question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now