<html><head><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}

p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head><body><div data-externalstyle="false" dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif;font-size:12pt;"><div>&nbsp;</div><div>&gt; Yes, the question is why in the first example we have dispose and in the<br>&gt; second we dont ?<br>&gt; I was looking at the two examples in the activiz users guide<br>&gt; <a href="http://www.kitware.com/KWLD/download/download.php?cid=anonymous&amp;fid=63&amp;pid=17">http://www.kitware.com/KWLD/download/download.php?cid=anonymous&amp;fid=63&amp;pid=17</a><br></div><div>The answer is probably just&nbsp;“it was either not really necessary in the first example, or it was a documentation oversight, and it was overlooked in the second example”...</div><div>&nbsp;</div><div>That document is from 2008, and certainly does not represent the best coding style ever.</div><div>&nbsp;</div><div>I’d leave out all the Dispose calls unless they are proven necessary. (If you run into weird window close or shutdown crashes... something might need to be removed from a rendering view, but you still shouldn’t need explicit Dispose calls in most cases.)</div><div>&nbsp;</div><div>&nbsp;</div><div>HTH,<br>David</div><div>&nbsp;</div></div></body></html>