This should not be necessary, but better to be safe.
Different strategy: Keep the original dataSlice always around, because it has ownership of the original allocated C buffer. Add an intermediate NSData instance containing the valid buffer representation.