[vtk-developers] Smart pointer declaration macro?

Wes Turner wes.turner at kitware.com
Thu Jan 28 10:52:58 EST 2010


I vote for 1.  I also took the survey.

- Wes

On Thu, Jan 28, 2010 at 10:45 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> I kind of like having the votes here on the list.  With online
> surveys, not only is it very easy for someone to cheat, but you don't
> know who voted for what.  Anonymity of any sort has no place on the
> VTK developers list IMHO.
>
>   David
>
>
> On Thu, Jan 28, 2010 at 8:35 AM, Karthik Krishnan
> <karthik.krishnan at kitware.com> wrote:
> > I vote for (1) - leaving things the way they are... I also made it
> > known on the DavidDoria's survey.
> >
> > On Thu, Jan 28, 2010 at 10:33 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >> I vote for:
> >>
> >> 4. vtkLocalPointer<vtkClass> instance;
> >>
> >>  - David
> >>
> >> On Thu, Jan 28, 2010 at 8:31 AM, Marcus D. Hanwell
> >> <marcus.hanwell at kitware.com> wrote:
> >>> On Thursday 28 January 2010 10:16:24 Jeff Baumes 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.
> >>>>
> >>> My favorite is 4, then 2. I was thinking of reasonably concise API, I
> think 1
> >>> has needless repetition and does not make the code any clearer.
> >>>
> >>> Marcus
> >>>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.vtk.org/mailman/listinfo/vtk-developers
> >>
> >>
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtk-developers
> >
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>


-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
Technical Leader
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100128/09498d45/attachment.html>


More information about the vtk-developers mailing list