Skip to content

Remove NSObject.methodMap or make it thread-safe #34

Description

@Marcono1234

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions