[ITK-users] SetImportPointer(T *, LetFilterManageMemory)
Matt McCormick
matt.mccormick at kitware.com
Sat Mar 29 17:20:18 EDT 2014
Hi Emma,
Yes, the ImportImageContainer will call delete[] [1]
If new memory is allocated outside of ITK, then it will have to be
delete'd, too.
HTH,
Matt
http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/Common/include/itkImportImageContainer.hxx;h=d22c90a754066c23ba754e9d0148daf4ddabdaa7;hb=HEAD#l206
On Fri, Mar 28, 2014 at 3:50 PM, Emma Ryan <eryanvtk at yahoo.com> wrote:
> Hi,
>
> If I declare a variable such as
>
> float *img = new float[500];
>
> and pass 'img' to the import filter with the LetContainerManageMemory =
> true, then do I still need to
>
> call delete [] img ? Or will the filter take care of this ?. The
> documentation seems to imply that delete [] img will be called by ITK
> internally. Just want to confirm this.
>
> Also,if the output of RegionOfInterestImageFilter were to be duplicated,
> then do I need to clean up the memory ? Or will ITK smart pointers handle
> it ?
> I'm guessing not, but I'd rather somebody confirm this.
>
> thanks,
> Emma
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list