Sitelet https://github.com/beanshell/beanshell/issues/843
Skip to content

Declaring a scripted class pins its interpreter #843

Description

@jimjag

After evaluating class Foo { } in an Interpreter (whether or not it's ever instantiated), dropping the interpreter and running System.gc() up to 50 times still leaves it reachable via a WeakReference. A script with no class declaration (x = 1;) is collected normally under the same driver. This looks like the same underlying cause as the class-manager pinning issues filed separately, though it was measured with a different driver (this one doesn't first move the static loader on to another interpreter).

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

    as designedThis looks like an Issue/Bug but is actually an artifact based on how beanshell is designed.concurrencyCross-interpreter/thread races, deadlocks, or GC/lifecycle pinninghelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions