Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to check if there is a memory leak?

Posted on 1998-08-20
3
Medium Priority
?
186 Views
Last Modified: 2010-04-30
How do you check if my vb program (or any other program) has a memory leak problem?
0
Comment
Question by:yushimi
[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 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1430105
Use your system monitor.  THe NT monitor is especially useful.  Keep running your suspect app and view the availabel memory.  In extreme cases, your paging file activity will climb as well.  Of course, eventually, you will run out of virtual memory and your system will hang.  But you need to stress test your app, either keep rerunning it, or process a very large volume of data to get it to run long enough to see the effect.  The problem wiht many of the mory leaks is that they take out small pieces, and the effect only shows up in extended runs of the application, often cleaning itself up each time the app ends.
0
 
LVL 1

Expert Comment

by:rlarner
ID: 1430106
vb is, I believe, a system with automatic garbage collection.  This means that, in theory, there can be no memory leaks -- vb detects all "unused" memory and cleans it up.  I haven't worked enough with it to know if it truely works -- any VB gurus want to comment?

There is, however, a fairly easy way to narrow down where a memory leak is happening between different programs, if you know there is one.  Run Performance Monitor (PerfMon.exe), and add graph lines for each suspect process' Private Bytes.  You may also want to set the chart's options to increase the time between updates.  Then, perform a suspect activity MANY, MANY times.  (VB can push a button for you in a loop, etc.)  Check to see if private bytes has gone up significantly.


0
 

Author Comment

by:yushimi
ID: 1430107
how about win95?
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

719 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