Solved

Memory Leak using MDI Child Forms

Posted on 1998-10-09
6
210 Views
Last Modified: 2008-02-26
I am currently working on a VB5 project that uses about 10 MDI Child forms. During testing we found that as we opened up multiple instances of the same form and other forms, we are losing from 15 - 40 kb of memory per form. After about 3-4 hours of continuous use, the program receives an access violation Exception error. Is there anyway to release all resources allocated to these forms, or at least minimize what they waste?
0
Comment
Question by:mheeg
6 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1439052
Use Form.Unload when instance is no longer required...

M
0
 

Author Comment

by:mheeg
ID: 1439053
I am working on an NT 4.0 Workstation using SP3
0
 

Author Comment

by:mheeg
ID: 1439054
We currently use:
            Unload Me

And then in the Unload Event:
            Set frmWhatever = Nothing

Is this pretty much what you had in mind?
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:mheeg
ID: 1439055
We currently use:
            Unload Me

And then in the Unload Event:
            Set frmWhatever = Nothing

Is this pretty much what you had in mind?

0
 
LVL 14

Accepted Solution

by:
waty earned 150 total points
ID: 1439056
You can download the following file, it gives you indication on how optimize your application to avoid memory leaks, increase the speed...

http://www.geocities.com/ResearchTriangle/6311/article002.htm
0
 

Expert Comment

by:hess
ID: 3691114
Did you ever find a better answer for this? I'm having the same problem and really need to fix it.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

821 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