[vtk-developers] [Paraview-developers] Moving vtkMemberFunctionCommand to VTK

David Gobbi david.gobbi at gmail.com
Tue Oct 5 20:29:05 EDT 2010


Dangling pointers can be a big headache for application developers.
I think that an implementation without weak pointers would be
a mistake.

  David

On Tue, Oct 5, 2010 at 6:05 PM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
> Yes, right now I am requiring the handler is a vtkObjectBase subclass.
> Makes it easier to avoid dangling pointers. What do you guys think?
> Should we not require it to be a vtkObjectBase? That however means
> that user has to be careful about deleting objects that may have a
> handler registered.
>
> Utkarsh
>
>
> On Tue, Oct 5, 2010 at 7:35 PM, David Doria <daviddoria at gmail.com> wrote:
>> On Tue, Oct 5, 2010 at 7:24 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>> On Tue, Oct 5, 2010 at 5:12 PM, David Doria <daviddoria at gmail.com> wrote:
>>>>
>>>> Well done Utkarsh!
>>>>
>>>> The only issue is that there are hundreds of warnings like this when
>>>> building VTK:
>>>
>>> Those are just because "obj" is used as a local variable in the
>>> operator() method, if the variable is renamed the warnings will
>>> disappear.
>>>
>>>  David
>>>
>>
>> Utkarsh,
>>
>> I tried to use this to set a function of a Qt form as the observer but
>> it complains that:
>>
>> Common/vtkObject.h:252: error: cannot convert ‘Form*’ to ‘vtkObject*’
>> in argument passing
>>
>> which I'm assuming means the class is not derived from vtkObject
>> (which is true). Is this is required condition for this to work?
>>
>> David D.
>>
>



More information about the vtk-developers mailing list