[Insight-users] return a smart pointer

siqi chen siqichensc at gmail.com
Thu Dec 31 11:07:03 EST 2009


I dig into my old code and find that I used something like this before. Is
this correct? How do I check the reference count?

void main()
{
ImageType::Pointer image = fun();
}

ImageType::Pointer fun()
{
FilterType::Pointer filter = FilterType::New();
...
ImageType::Pointer img = filter->GetOutput();
filter->Update();
return img;
}

Thanks
Siqi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091231/b929878f/attachment.htm>


More information about the Insight-users mailing list