public void destroy() {
nativeDestroy(mNativeObject);
mNativeObject = 0;
}
static void nativeDestroy(JNIEnv* env, jclass clazz, jlong ptr) {
sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr);
queue->decStrong((void*)nativeCreate);
}
调用 nativeDestroy()
递减强引用计数。mNativeObject
设置为 0。