Memory management discrepency with DeviceEventSimple
Similar to #31 (closed) and 7dfb0b7f, AtspiDeviceEventSimpleCB
has the stroke
parameter marked transfer full, but it is also const
, which is kind of contradictory.
I'm not sure what the best fix is here.
- On one hand, given that
AtspiDeviceEventSimpleCB
is a convenience API not really suited to language bindings, it would only make sense to have the parameterconst
and not transfer full, so it's easy to use. That would only requireremove_device_datum()
to free the event itself. - On the other hand, anybody using that API with enough motivation to track leaks would have realized that it requires freeing the
stroke
parameter, so it's not very safe to change that.
So it's a bit of an unfortunate situation here, but I think at least the parameter should not be const
anymore if nothing else changes.