[Insight-users] object factories and the heap

Karthik Krishnan karthik.krishnan at kitware.com
Tue Apr 17 13:08:40 EDT 2007


Hi Steve,

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.

----------------------------
revision 1.32
date: 2007-04-17 13:05:55 -0400;  author: karthik;  state: Exp;  lines: +2
-2
BUG: Pointed out by Steve Robbins on the users list:
http://public.kitware.com/pipermail/insight-users/2007-April/021901.html
----------------------------

--
karthik

On 4/17/07, Steve M. Robbins <steve at sumost.ca> wrote:
>
> I'm starting to read the ITK software guide more closely
> (http://itk.org/files/v3.2/ItkSoftwareGuide-2.4.0.pdf).
>
> When I got to this passage, I started scratching my head.
>
>     3.2.3 Object Factories
>
>     Most classes in ITK are instantiated through an object factory
>     mechanism. That is, rather than using the standard C++ class
>     constructor and destructor, instances of an ITK class are created
>     with the static class New() method. In fact, the constructor and
>     destructor are protected: so it is generally not possible to
>     construct an ITK instance on the heap...
>
> I think the authors meant "stack" rather than "heap" in this section.
> Correct?
>
> -Steve
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Karthik Krishnan
R&D Engineer,
Kitware Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070417/d05400bb/attachment.htm


More information about the Insight-users mailing list