OpenNETCF HTMLViewer control problem

  • Thread starter Thread starter Jan Yeh [MVP]
  • Start date Start date
J

Jan Yeh [MVP]

I tried HTMLViewer in a test windows form application,
and it worked fine.

However, the problem is when I use 2 HTMLViewer controls
in Form1 and Form3, the application residue in memory after
application closed. I tried to remove the second HTMLViewer
control in Form3, and it works ok.

I wonder if this control can not have 2 instances in an application?
Or it have to be close or dispose before closing my application?

Since the OpenNETCF.org website is down now, I have to post
my question here.

--
Best Regards,
Jan Yeh

eMVP, MCAD, .NETcf Developer
Mobile Mind Company @ Taiwan
http://blog.mvpcn.net/janyeh
 
Which version of the HTMLViewer are you using? Its gone through several
re-writes, there was a version available separately, and more recently an
all-new version as part of the Smart Device Framework.
Are you calling Dispose() on the controls either in your Form.closing
handler or similar.

Peter
 
Hello, Peter

I use the HTMLViewer included in SDF 1.0 (1.0.293.0).

I tested for different situations.

First, the HTMLViewer can be used in the startup form without
problems, I even use 2 HTMLViewer controls in this form.
I don't use any Dispose() in this form, and nothing left after
my application ends. Everything goes fine!

Then the problem is,when I add a HTMLViewer control in another
form in the same project. After my application ends, the process
is still alive. I just add it into the form, and writing no code for it.
I did try calling Dispose(), set to null in the Form.Closing event,
doesn't help at all.

I found HTMLViewer.Finalize() in the document, but it seems can
not be invoked...

--
Best Regards,
Jan Yeh

eMVP, MCAD, .NETcf Developer
Mobile Mind Company @ Taiwan
http://blog.mvpcn.net/janyeh
 
Back
Top