Board index » Visual Studio » Locating resource leaks
|
mjreisbord
|
|
mjreisbord
|
Locating resource leaks
Visual Studio149
Are there any good tools to help diagnose resource / memory leaks in VB 6 apps ? Thnks Bruce - |
| Robert
Registered User |
Tue Jul 20 03:53:13 CDT 2004
Re:Locating resource leaks
Thanks for the laugh
Robert "Beeeeeeeeeeeeves" <Beeeeeeeeeeeeves@discussions.microsoft.com>wrote in message news:28EBB78B-65FD-4E99-AE47-291B1170E71B@microsoft.com... QuoteVB doesn't have memory leaks. Don't get ideas above your station. - |
| Bruce
Registered User |
Tue Jul 20 19:01:25 CDT 2004
Re:Locating resource leaks
If you say so. Quite chuckle in the corner.
"Beeeeeeeeeeeeves" <Beeeeeeeeeeeeves@discussions.microsoft.com>wrote in message news:28EBB78B-65FD-4E99-AE47-291B1170E71B@microsoft.com... QuoteVB doesn't have memory leaks. Don't get ideas above your station. - |
| Robert
Registered User |
Wed Jul 21 03:01:20 CDT 2004
Re:Locating resource leaks
OK, seriously.
I know of no tool that really can help you find resource or memory leaks in VB, which supports VB natively. Tools like, e.g., Rational Purify can find memory leaks, but you won't see how they are related to your code. It just helps to compare a before - after (but don't ask the price). It might make sense to use a code inspector, such as the one included in MZ-Tools (www.mztools.com/).">www.mztools.com/). Generally, I've found the following "hot spots", where memory or resource leaks are most likely to occur (always depending on what exactly you understand as a memory or resource leak): *) Form unloading Explicitly create instances of your forms, and keep these variables. This gives you control over the lifecycle. e.g. Dim MyForm as frmMyForm Set MyForm = New frmMyForm Load MyForm MyForm.Show [...] MyForm.Hide Unload MyFrom Set MyForm = Nothing *) Avoid the 'Dim [...] as NEW' *) Ensure all objects have correctly terminated Use reference counters in the _Initialize and _Terminate events. Check these reference counters. *) 3rd party ActiveX-Controls Also ensure you have the newest VB Service pack Robert "Bruce Baker" <bruceb@ardex.com.au>wrote in message QuoteAre there any good tools to help diagnose resource / memory leaks in VB 6 - |
| Robert
Registered User |
Wed Jul 21 03:16:13 CDT 2004
Re:Locating resource leaks
Forgot to mention the graphic card drivers. They can be big trouble if you
use certain drawing operations. Robert "Robert" <noone@nowhere.com>wrote in message QuoteOK, seriously. - |
| AustinMN
Registered User |
Wed Jul 21 08:36:54 CDT 2004
Re:Locating resource leaks
Robert top-posted:
< snip> QuoteAlso ensure you have the newest VB Service pack problem it fixes vs SP5. Austin - |
| erewhon
Registered User |
Wed Jul 21 12:18:09 CDT 2004
Re:Locating resource leaks
On Wed, 21 Jul 2004 13:36:54 GMT, "AustinMN" <tacooperX@Xatt.net>
wrote: QuoteRobert top-posted: - |
