the FFI and C reference counting