[Insight-developers] GradientRecursiveGaussianImageFilter never deleted

Karthik Krishnan Karthik.Krishnan at kitware.com
Sat Jun 18 16:16:04 EDT 2005


One solution is to avoid having the ProgressAccumulator as an ivar of 
the class.  
Frankly the progress accumulator is useful only during the Update calls. 
So we could restrict its scope to the GenerateData() method, instead of 
creating it in the constructor.

So one solution is:
::GenerateData()
{
  ProgressAccumulator::Pointer progress = ProgressAccumulator::New();
  progress->SetMiniPipelineFilter(this);
......
......
}


Julien Jomier wrote:

> Hi all,
>
> I found an issue in the GradientRecursiveGaussianImageFilter and I 
> don't know how to solve it.
>
> Basically the filter is registered by the ProgressAccumulator using 
> the SetMiniPipelineFilter(this). This is done in the constructor and 
> therefore the reference count can never be less than 2 and the filter 
> is never destroyed.
>
> If someone knows a fix to this...
>
> Julien
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>


More information about the Insight-developers mailing list