473,811 Members | 3,241 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.remove al
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.removea ll/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 3993
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******** *************** ***********@mic rosoft.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.remove all
tooltip1.dispos e

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.removea ll/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******** *************** ***********@mic rosoft.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.remove all
tooltip1.dispos e

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.removea ll/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 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...
4
1173
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 vector to push_back thousands class. any advice?
8
3417
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 ? In nut shell, what is/are the realtion/s between the Memory Leak and Memory Corruption. Juts Theoritical Assumtion below:
0
1399
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. Im having problem with a tooltip. I have link label in my form and attached a tooltip to it. When i dispose the linklabel and the tooltip, the tooltip
20
8122
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 matches are called within a loop (like if or for). E.g. for(int i = 0; i < 10; i++) { Regex r = new Regex();
23
4579
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
5332
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". Anybody know anything about this? Does *Javascript* leak memeory, or does the *browser* leak memory?
1
2055
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 tootip.SetToolTip(controlName,text) the controls tooltip is updated every second. There are 50+ of these controls on a form. I have used perfmon and graphed the working set of my application to track this problem to the tooltip method. With tooltip.SetToolTip...
0
1633
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 directory>\Common7\Tools \Bin\winnt\Dbmon.Exe). <3>If you use the tooltip in native code,then run the program,show the tooltip,then exit the program, the Dbmon.exe will report serious direct3d9 memleak in xp and vista os.but If I use the wpf tooltip in c#,it is...
22
9370
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 memory leak someplace. I can not detect the memory leak by running several reports by hand, but when I run tha app as a servrice and process few hundred reports there is significant memory leak. The application can consume over 1GB of memory where it...
0
9724
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10127
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.