GetByteArrayElements何时返回null
When does GetByteArrayElements return null?
我正在使用JNI/NDK将一些C++库与Android应用程序绑定。其中一个Java方法使用字节数组,因此我需要在JNI绑定中调用GetByteArrayElements。在什么情况下GetByteArrayElements返回NULL?Oracle的文档简单地说明:
Returns a pointer to the array elements, or NULL if the operation fails.
哪些情况会导致操作失败并返回NULL?
如果操作失败,它将返回NULL,否则不会返回,包括空数组的情况。
相关文章:
- 如果我std::dynamic_pointer_cast并且底层dynamic_cast的结果为null,那么返回的sh
- 如何在映射中返回null
- 为什么返回 NULL 不会破坏函数?
- fopen 在 gdb 中返回 NULL
- 为什么要从main()返回NULL?
- 为什么TinyXML2的XMLDocument::FirstChild()函数在尝试解析这个有效的XML文件时返回NULL?
- Box2D World.GetBodyList() 返回 NULL,但 World 显然正在更新对象
- API 返回智能指针的 std::optional 以明确指定指针可能为 null 是否有意义?
- boost::p ython:PyErr_Fetch始终返回 NULL 回溯
- 如何在 Visual C++ 中从返回类型为 map 的函数返回 null?
- 如何在C++中返回Null作为引用
- 从模板化函数返回Null对象
- 如何返回值为NULL的变量指针
- Windows 函数"GetCursorInfo"返回成功,但光标的句柄为 NULL
- GDALOpen 在 GEOTiff 文件上返回 null
- 将对象作为 null 返回内容
- QList<float* 类型的 NULL 返回值>
- 在用C++编写的COM客户端中引发异常的Null返回值
- nullptr初始值和WinAPI NULL返回
- DirectX pEnum->Next(1,&pPin,NULL) 返回S_FALSE