[Insight-developers] GradientRecursiveGaussianImageFilter
never deleted
Bill Lorensen
wlorens1 at nycap.rr.com
Sat Jun 18 23:02:41 EDT 2005
Julien,
I think there will still be a leak with your fix. In Karthik's note, he did
not use an ivar for progress, he used a local variable. That local will be
destructed upon return form the method. Therefore, no reference will be held,
Bill
At 06:22 PM 6/18/2005, Julien Jomier wrote:
>Hi Karthik,
>
>Thanks for the input.
>I just commited a fix.
>
>Julien
>
>Karthik Krishnan wrote:
>>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
>>_______________________________________________
>>Insight-developers mailing list
>>Insight-developers at itk.org
>>http://www.itk.org/mailman/listinfo/insight-developers
>>
>
>_______________________________________________
>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