Resolving Memory Leak issues

This forum is for general support of Xbase++
Post Reply
Message
Author
User avatar
sfsltd
Posts: 28
Joined: Sat Jan 30, 2010 7:23 am
Location: UK

Resolving Memory Leak issues

#1 Post by sfsltd »

Hi

Is there better a way to diagnose & resolve memory leak issues in XBase++ ?

We have encountered significant Memory Leak issues in our new release... unfortunately this discovery happened at the very end of many months work and this is holding up the distribution of the 'new' edition.

The tool we are using to look into memory usage is VMMap by Sysinternals. This gives us a difference in memory use between two points in time when it monitors our application process.

While we can snapshot the application as we use it and see the type of memory being consumed, because it's an external monitor, it does not tie into the code being executed. We are therefore using it in conjunction with the code running in debug mode to enable us to take snapshots at execution points we 'guess' to be of interest.

Is there a better way to trace memory use in XBase++??

Thanks
Michael

http://technet.microsoft.com/en-us/sysi ... 35533.aspx

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Resolving Memory Leak issues

#2 Post by rdonnay »

Have you used MemWatch.dll to see if the problem is with releasing Windows resources?

It could be that you have static or public pointers to some objects or a GetList or an array that has pointers to objects in it. If there is any object or any array with objects that doesn't get released, then the garbage collector can't release the Windows resources.
The eXpress train is coming - and it has more cars.

User avatar
sfsltd
Posts: 28
Joined: Sat Jan 30, 2010 7:23 am
Location: UK

Re: Resolving Memory Leak issues

#3 Post by sfsltd »

Roge

No, we did try EventSpy.dll when we were looking into the behaviour of the Scoped Browse Combo dropdown.. but couldn't find a way to see events on the sub-form.

Any tips on using the MemWatch.dll ?

Michael

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Resolving Memory Leak issues

#4 Post by rdonnay »

All you do is a Dllload('MEMWATCH.DLL') at the beginning of your program. It will display a window that will update you on memory usage. You should see memory getting released when you close windows. If you don't, that's a red flag.
The eXpress train is coming - and it has more cars.

Post Reply