By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,435 Members | 2,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,435 IT Pros & Developers. It's quick & easy.

Bug Found? Tooltip memory leak

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.