473,507 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3971
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
314
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
1162
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
3394
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
1388
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
8024
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
4509
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
5291
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
2040
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
1609
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
9303
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
7223
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,...
1
7031
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
7485
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
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,...
1
5042
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1542
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.