fix reference counting for GtkWidgets created from java

GtkWidgets extend GInitiallyUnowned and are automatically freed when
removing from parent widget. We need to add an extra reference, to make
sure the object keeps alive as long as the java widget has a reference
to it
This commit is contained in:
Julian Winkler
2023-08-22 13:49:09 +02:00
parent faf4a3281e
commit 36b6132324
12 changed files with 36 additions and 11 deletions

View File

@@ -255,6 +255,14 @@ JNIEXPORT jlong JNICALL Java_android_view_View_native_1constructor
JNIEXPORT void JNICALL Java_android_view_View_native_1set_1size_1request
(JNIEnv *, jobject, jint, jint);
/*
* Class: android_view_View
* Method: native_destructor
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_android_view_View_native_1destructor
(JNIEnv *, jobject, jlong);
/*
* Class: android_view_View
* Method: nativeInvalidate