The field NSObject.methodMap is of type HashMap and is accessed without any synchronization:
|
private static Map<Class,Map<String,Method>> methodMap = new HashMap<Class,Map<String,Method>>(); |
However, if access it correctly synchronized it would still be a memory leak because the map would constantly grow and is never cleared.
Would it maybe make sense to make this an instance field (i.e. remove static)? Though I am not very familiar with this project and what performance implications this would have.
The field
NSObject.methodMapis of typeHashMapand is accessed without any synchronization:Java-Objective-C-Bridge/src/main/java/ca/weblite/objc/NSObject.java
Line 72 in 62409c5
However, if access it correctly synchronized it would still be a memory leak because the map would constantly grow and is never cleared.
Would it maybe make sense to make this an instance field (i.e. remove
static)? Though I am not very familiar with this project and what performance implications this would have.