[Insight-users] smart pointer

chensiqi pidanchen at hotmail.com
Wed Dec 17 23:34:49 EST 2008


 
Hi, ITKers,
 
I have a smart pointer problem.
Here is my code:
///////////////////////////////
 
#include ""
 
typedef   itk::XXXX <> FilterType
FilterType filter = FilterType::New();
 
int main()
{
      ..........................
      filter->Update();
      funa();
      ..........................
}
void funa()
{
      .................
      filter->update();
      ..................
}
//////////////////////////////////////
The program will throw out an exception about filter garbage collection.
How to fix this exception without passing the filter as a parameter to funa?
 
Any input will be appreciated.
Siqi
_________________________________________________________________
MSN安全保护中心,免费修复系统漏洞,保护MSN安全!
http://im.live.cn/safe/center/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081218/3c0a0850/attachment-0001.htm>


More information about the Insight-users mailing list