Posted by:
grin (---.wroclaw.cvx.ppp.tpnet.pl)
Hi,
The problem isn't about many instances of HtmlEditor(), try this test:
1) Comment this line out from Form1.InitializeComponent(),
so there is no instance of HtmlEditor:
this.htmlEditor1 = new onlyconnect.HtmlEditor();
compile & run, check memory usage using Task Manager
- mine is showing 170448 K
2) Uncomment the line out, so there is only one instance of HtmlEditor,
compile & run, check memory usage
- mine is showing 182624 K
3) Add three more instances of HtmlEditor:
this.htmlEditor2 = new onlyconnect.HtmlEditor();
this.htmlEditor3 = new onlyconnect.HtmlEditor();
this.htmlEditor4 = new onlyconnect.HtmlEditor();
compile & run, memory usage is 182880 K
-----
As you can see the amount of memory used by one instance of HtmlEditor
is almost the same as amount used by four instances(it's about 12M

,
with next instances memory is increasing but not so drastically as with first.
What I want to do is to remove at some point in my code one (and only)HtmlEditor instance, so I can reduce memory usage as in point 2)
to the level of point 1).