[vtk-developers] zero-copy mixed language support in vtkDataArray
ben.boeckel at kitware.com
Sat Jan 18 00:19:21 EST 2014
On Fri, Jan 17, 2014 at 15:21:42 -0800, Burlen Loring wrote:
> Yes, my intention is that for now they'd be used from glue code
> rather than exposed directly. In the future the API could be exposed
> in the wrapped languages if there were a compelling use case for it.
> Until then it's not worth the effort since I doubt VTK wrapping codes
> would handle it correctly.
That's valid; just making sure :) .
> OK. as fas as VTK is concerned callbackData is intended to be a key
> for use by the callback, and VTK does nothing with it beyond passing
> it to the callback. I'll add a note about this to clarify.
Thanks. The problem with callback context ownership is that if it's a
one-time, the callback "owns" the context, but if it's a notification
kind of thing, the *notifier* owns the context (since the callback may
never be called) and needs an additional function to free the context.
> Works for me, although I'm not sure NULL callbackData is ever valid/usefull.
As an example, if you have a LocalFree or whatever on Windows, you just
need the array parameter, so NULL callbackData is needed. Where array
and callbackData might be needed is something like where you need the
array, but callbackData is the arena to free it from. Currently, you
only get one or the other.
More information about the vtk-developers