[vtk-developers] Smart pointer declaration macro?

David Cole david.cole at kitware.com
Thu Jan 28 10:24:01 EST 2010


On Thu, Jan 28, 2010 at 10:16 AM, Jeff Baumes <jeff.baumes at kitware.com>wrote:

> On Thu, Jan 28, 2010 at 10:00 AM, Will Schroeder
> <will.schroeder at kitware.com> wrote:
> > Jeff can you summarize the proposed solutions (assuming we think we've
> > covered the bases) and let's take a vote on this. I want to keep my inbox
> > clear :-(
>
> 1. Keep things the way they are:
> vtkSmartPointer<vtkClass> c = vtkSmartPointer<vtkClass>::New();
>
> 2. Add new constructor to vtkSmartPointer that takes a bool and if
> true creates an instance of the object. Code would look like:
> vtkSmartPointer<vtkClass> c(true);
>
> 3. Create typedefs for vtkSmartPointer<vtkClass>:
> vtkClassSP c = vtkClassSP::New();
>
> 4. Make a new vtkLocalPointer type that is the same as vtkSmartPointer
> but always creates an instance of the object.
> vtkLocalPointer<vtkClass> c;
>
> Unfortunately our inboxes won't be clear until everyone responds with
> a vote (I'd maybe give it till 12pm eastern time). We can take it to
> the ARB if there is no clear consensus.
>
>
I vote for 3 (even though it uses an abbreviation in violation of one of our
conventions)

Or 1 -- keep things the way they are.


David C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100128/28b6d2b4/attachment.html>


More information about the vtk-developers mailing list