PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Modal dialog and webbrowser control leak

Reply

Modal dialog and webbrowser control leak

 
Thread Tools Rate Thread
Old 25-06-2003, 04:30 PM   #1
Guest
 
Posts: n/a
Default Modal dialog and webbrowser control leak


I have discovered a leak when using the webbrowser control on a form
displayed as a modal dialog. Navigate has to be called to see the leak.

While viewing Task Manager's Processes tab, it appears to leak a 'USER
Object', 'Handle' and 'Virtual Memory'. While using Spy++, I can see that
it leaves behind an 'Internet Explorer_Hidden' window every time I display
my modal dialog. Calling the form's Dispose method does not help. If I
display the form as modeless, this leak does not occur.

In my Dispose method I can add code that sends an IDCANCEL to all child
windows of the modal dialog and this will close the hidden window and plug
the leak. I'm not sure if this is safe to do though.

Has anyone else run into this problem? Any other safe work arounds?

Thanks,
Jeff Young
Software Engineer




  Reply With Quote
Old 26-06-2003, 04:24 PM   #2
ZeusDDawg
Guest
 
Posts: n/a
Default Re: Modal dialog and webbrowser control leak

Anyone from Microsoft care to comment?

Thanks,
Jeff

<ZeusDDawg@hotmail.com> wrote in message
news:eOAkBYyODHA.3088@TK2MSFTNGP10.phx.gbl...
> I have discovered a leak when using the webbrowser control on a form
> displayed as a modal dialog. Navigate has to be called to see the leak.
>
> While viewing Task Manager's Processes tab, it appears to leak a 'USER
> Object', 'Handle' and 'Virtual Memory'. While using Spy++, I can see that
> it leaves behind an 'Internet Explorer_Hidden' window every time I display
> my modal dialog. Calling the form's Dispose method does not help. If I
> display the form as modeless, this leak does not occur.
>
> In my Dispose method I can add code that sends an IDCANCEL to all child
> windows of the modal dialog and this will close the hidden window and plug
> the leak. I'm not sure if this is safe to do though.
>
> Has anyone else run into this problem? Any other safe work arounds?
>
> Thanks,
> Jeff Young
> Software Engineer
>
>
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off