chensiqi
2008-12-18 04:34:49 UTC
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/
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/