Bug Found? Tooltip memory leak

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Richardson

    #1

    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


  • Charles Law

    #2
    Re: Bug Found? Tooltip memory leak

    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" <simon@s-net.co.uk> wrote in message
    news:E04C6FAE-63D0-4F5E-A7C3-68EF57B68AAF@mi crosoft.com...[color=blue]
    > I recently found that one of my application was leaking memory every time[/color]
    I closed a MDIChild form. The garbage collector never reclaimed it and my
    windows handles kept increasing and increasing until eventually the
    application crashed.[color=blue]
    >
    > After three days of looking through all of my code I found that it was the[/color]
    TOOLTIP component that was causing the problem.[color=blue]
    >
    > The overcome the problem I had to add the following to the CLOSING[/color]
    procedure in the form[color=blue]
    >
    > 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[/color]
    tooltip.removea ll/dispose). Without the tooltip it worked fine.[color=blue]
    > 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[/color]
    the same problem as I wasted two whole days trying to find this problem and
    hopefully can save other people some time.[color=blue]
    >
    > Microsoft... I think this component needs looking at.
    >
    > Kind Regards
    > Simon
    >
    >
    >[/color]


    Comment

    • Simon Richardson

      #3
      Re: Bug Found? Tooltip memory leak

      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

      Comment

      Working...