[Insight-developers] IRIX64-6.5-CC-n32-Continuous errors and CastImageFilter
Aljaz Noe
noe at grasp . cis . upenn . edu
Tue, 6 Aug 2002 09:15:41 -0400
> The ITK standard was to receive Raw pointers as arguments
> to functions/methods and to return SmartPointers from
> functions/methods.
>
> The reason for receiving Raw pointers in arguments was
> to make polymorphism possible.
Can you explain this? I know that pretty much everything in the FEM
library is polymorphic. And AFAIK it worked quite well with
SmartPointers using a &* hack.
> After the UNC meeting this year, it was pointed out that
> the use of SmartPointers implied a penalty in performance
> due to Mutex operations. We went through all the toolkit
> and reduce the use of SmartPointers returned from functions.
>
> Currently most of the code receives and returns raw pointers.
> The only functions/methods returning SmartPointer are those
> constructing the object to be returned.
So... Should we change the FEM library from T::Pointer back to T*? The
only benefit in doing this IMHO is that we could use one or two forward
class declarations instead of #include's.
Aljaz