473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Bug Found? Tooltip memory leak

I recently found that one of my application was leaking memory every time I closed a MDIChild form. The garbage collector never reclaimed it and my windows handles kept increasing and increasing until eventually the application crashed

After three days of looking through all of my code I found that it was the TOOLTIP component that was causing the problem

The overcome the problem I had to add the following to the CLOSING procedure in the for

tooltip1.removeal
tooltip1.dispos

The problem then went away

Out of interest I created a new application to see what happened
With the tooltip added it leaked memory (unless I did a tooltip.removeall/dispose). Without the tooltip it worked fine
Tried this in both VB 2002 and VB 2003 and both did the same

Just thought it worth posting something here in case anyone else is having the same problem as I wasted two whole days trying to find this problem and hopefully can save other people some time

Microsoft... I think this component needs looking at

Kind Regard
Simo
Nov 22 '05 #1
4 3967
Hi Simon

As you have spent time with the tooltip control, I wonder if you have had
any other problems? I have not experienced the leak - although it looks like
I will sooner or later - but I have found that when I attach a tooltip to a
checkbox, for example, the tooltip disappears every time I click the
checkbox, and never comes back.

I am having to reset the tooltip in the click event at the moment, but I
don't like it.

I have also read that there is a problem when hiding and re-showing, or
minimising and restoring a window with tooltips. The suggestion is that the
same thing happens, i.e. the tooltips disappear.

Have you seen any of these happen, or do you have any other special
techniques for dealing with tooltips?

TIA

Charles
"Simon Richardson" <si***@s-net.co.uk> wrote in message
news:E0**********************************@microsof t.com...
I recently found that one of my application was leaking memory every time I closed a MDIChild form. The garbage collector never reclaimed it and my
windows handles kept increasing and increasing until eventually the
application crashed.
After three days of looking through all of my code I found that it was the TOOLTIP component that was causing the problem.
The overcome the problem I had to add the following to the CLOSING procedure in the form
tooltip1.removeall
tooltip1.dispose

The problem then went away.

Out of interest I created a new application to see what happened.
With the tooltip added it leaked memory (unless I did a tooltip.removeall/dispose). Without the tooltip it worked fine. Tried this in both VB 2002 and VB 2003 and both did the same.

Just thought it worth posting something here in case anyone else is having the same problem as I wasted two whole days trying to find this problem and
hopefully can save other people some time.
Microsoft... I think this component needs looking at.

Kind Regards
Simon

Nov 22 '05 #2
Hi Simon

As you have spent time with the tooltip control, I wonder if you have had
any other problems? I have not experienced the leak - although it looks like
I will sooner or later - but I have found that when I attach a tooltip to a
checkbox, for example, the tooltip disappears every time I click the
checkbox, and never comes back.

I am having to reset the tooltip in the click event at the moment, but I
don't like it.

I have also read that there is a problem when hiding and re-showing, or
minimising and restoring a window with tooltips. The suggestion is that the
same thing happens, i.e. the tooltips disappear.

Have you seen any of these happen, or do you have any other special
techniques for dealing with tooltips?

TIA

Charles
"Simon Richardson" <si***@s-net.co.uk> wrote in message
news:E0**********************************@microsof t.com...
I recently found that one of my application was leaking memory every time I closed a MDIChild form. The garbage collector never reclaimed it and my
windows handles kept increasing and increasing until eventually the
application crashed.
After three days of looking through all of my code I found that it was the TOOLTIP component that was causing the problem.
The overcome the problem I had to add the following to the CLOSING procedure in the form
tooltip1.removeall
tooltip1.dispose

The problem then went away.

Out of interest I created a new application to see what happened.
With the tooltip added it leaked memory (unless I did a tooltip.removeall/dispose). Without the tooltip it worked fine. Tried this in both VB 2002 and VB 2003 and both did the same.

Just thought it worth posting something here in case anyone else is having the same problem as I wasted two whole days trying to find this problem and
hopefully can save other people some time.
Microsoft... I think this component needs looking at.

Kind Regards
Simon

Nov 22 '05 #3
What I do with Tooltips is very basic. I add it as a control on my form and then type text into each field
When looking at my applications which use tooltips I seem to have problems of various kinds in them all

By deleting the tooltip control, problems go away

Must admit that the tooltip isn't very functional either.. would be nice to have bubble tips etc

Maybe if we ask nicely we will get a more functional, less buggy control

Anyone else any comments on this
Simon
Nov 22 '05 #4
What I do with Tooltips is very basic. I add it as a control on my form and then type text into each field
When looking at my applications which use tooltips I seem to have problems of various kinds in them all

By deleting the tooltip control, problems go away

Must admit that the tooltip isn't very functional either.. would be nice to have bubble tips etc

Maybe if we ask nicely we will get a more functional, less buggy control

Anyone else any comments on this
Simon
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Simon Richardson | last post by:
I recently found that one of my application was leaking memory every time I closed a MDIChild form. The garbage collector never reclaimed it and my windows handles kept increasing and increasing...
4
by: rokia | last post by:
I found many people encounter this problem. and someone say that it's STL strategy. but I dont know when will it release those memory. BoundCheck report there are many memory leak when I use...
8
by: ranjeet.gupta | last post by:
Dear All Is the Root Cause of the Memory corruption is the Memory leak, ?? suppose If in the code there is Memory leak, Do this may lead to the Memory Corruption while executing the program ? ...
0
by: Gupta | last post by:
Hi, Iam working on a C# application currently and involved in testing and fixing memory leaks in the application. The application has one main form which exists throughout the application cycle....
20
by: jeevankodali | last post by:
Hi I have an .Net application which processes thousands of Xml nodes each day and for each node I am using around 30-40 Regex matches to see if they satisfy some conditions are not. These Regex...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
1
by: =?Utf-8?B?RnJlZEM=?= | last post by:
My application uses the tooltip to display "realtime" data. When a user hovers over a control, information like temperatures and pressures are displayed in the tooltip. Using...
0
by: walve_wei | last post by:
<1>use the D3D control panel, enable the debug DLL and maximum validation,for D3D control panel ,you need to install the directx sdk. <2>Start up the debug monitor (<MSVC install...
22
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several reports at one time. My problem - there is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.