OpenNETCF HTMLViewer control problem

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
 
P

Peter Foot [MVP]

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
 
J

Jan Yeh [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top