Hi Steve,<br><br>Thanks for pointing out the bug. The objects are allocated on the heap and the smart pointers that contain them are allocated on the stack. This fixed in CVS and will appear on the next version of the software guide.
<br><br>----------------------------<br>revision 1.32<br>date: 2007-04-17 13:05:55 -0400;&nbsp; author: karthik;&nbsp; state: Exp;&nbsp; lines: +2 -2<br>BUG: Pointed out by Steve Robbins on the users list: <a href="http://public.kitware.com/pipermail/insight-users/2007-April/021901.html">
http://public.kitware.com/pipermail/insight-users/2007-April/021901.html</a><br>----------------------------<br><br>--<br>karthik<br><br><div><span class="gmail_quote">On 4/17/07, <b class="gmail_sendername">Steve M. Robbins
</b> &lt;<a href="mailto:steve@sumost.ca">steve@sumost.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m starting to read the ITK software guide more closely
<br>(<a href="http://itk.org/files/v3.2/ItkSoftwareGuide-2.4.0.pdf">http://itk.org/files/v3.2/ItkSoftwareGuide-2.4.0.pdf</a>).<br><br>When I got to this passage, I started scratching my head.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;3.2.3 Object Factories
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Most classes in ITK are instantiated through an object factory<br>&nbsp;&nbsp;&nbsp;&nbsp;mechanism. That is, rather than using the standard C++ class<br>&nbsp;&nbsp;&nbsp;&nbsp;constructor and destructor, instances of an ITK class are created<br>&nbsp;&nbsp;&nbsp;&nbsp;with the static class New() method. In fact, the constructor and
<br>&nbsp;&nbsp;&nbsp;&nbsp;destructor are protected: so it is generally not possible to<br>&nbsp;&nbsp;&nbsp;&nbsp;construct an ITK instance on the heap...<br><br>I think the authors meant &quot;stack&quot; rather than &quot;heap&quot; in this section.<br>Correct?
<br><br>-Steve<br><br><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">
http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Karthik Krishnan<br>R&amp;D Engineer,<br>Kitware Inc.