[Insight-developers] smart pointer and stl containers
Karthik Krishnan
karthik.krishnan at kitware.com
Mon Jan 19 14:21:12 EST 2009
Yes its perfectly fine to do this and with all smartpointers in
general.
--
k
On Mon, Jan 19, 2009 at 2:04 PM, Leila Baghdadi
<baghdadi at phenogenomics.ca>wrote:
> Hi guys,
>
> just wondering
>
> if I create a vector of itk objects (smart pointers), can I trust that
> at completion of the program all objects will be deleted. hence no
> garbage created?
>
>
> typedef DefaultDynamicMeshTraits<double, 3, 3, double,double>
> SimplexMeshTraits;
> typedef SimplexMesh<double,3, SimplexMeshTraits> SimplexMeshType;
>
> std::vector< typename SimplexMeshType::Pointer >
> m_SimplexMesh;
>
>
> thanks
>
> Leila
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
--
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 371 3971 x119
Fax: 518 371 3971
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090119/607ede63/attachment.htm>
More information about the Insight-developers
mailing list