Skip to content

Commit

Permalink
Remove unused weak_handle field
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Sep 23, 2024
1 parent 49e01de commit 0087a52
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/Java.Interop/Java.Interop/JavaException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ unsafe public class JavaException : Exception, IJavaPeerable
JniObjectReferenceType handle_type;
#pragma warning disable 0169
// Used by JavaInteropGCBridge
IntPtr weak_handle;
int refs_added;
#pragma warning restore 0169
#endif // FEATURE_JNIOBJECTREFERENCE_INTPTRS
Expand Down
1 change: 0 additions & 1 deletion src/Java.Interop/Java.Interop/JavaObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ unsafe public class JavaObject : IJavaPeerable
JniObjectReferenceType handle_type;
#pragma warning disable 0169
// Used by JavaInteropGCBridge
IntPtr weak_handle;
int refs_added;
#pragma warning restore 0169
#endif // FEATURE_JNIOBJECTREFERENCE_INTPTRS
Expand Down
4 changes: 1 addition & 3 deletions src/java-interop/java-interop-gc-bridge-mono.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ typedef struct MonoJavaGCBridgeInfo {
MonoClassField *handle;
MonoClassField *handle_type;
MonoClassField *refs_added;
MonoClassField *weak_handle;
} MonoJavaGCBridgeInfo;

#define NUM_GC_BRIDGE_TYPES (4)
Expand Down Expand Up @@ -354,10 +353,9 @@ java_interop_gc_bridge_register_bridgeable_type (
info->handle = mono_class_get_field_from_name (info->klass, const_cast<char*> ("handle"));
info->handle_type = mono_class_get_field_from_name (info->klass, const_cast<char*> ("handle_type"));
info->refs_added = mono_class_get_field_from_name (info->klass, const_cast<char*> ("refs_added"));
info->weak_handle = mono_class_get_field_from_name (info->klass, const_cast<char*> ("weak_handle"));

if (info->klass == NULL || info->handle == NULL || info->handle_type == NULL ||
info->refs_added == NULL || info->weak_handle == NULL)
info->refs_added == NULL)
return -1;
bridge->num_bridge_types++;
return 0;
Expand Down

0 comments on commit 0087a52

Please sign in to comment.