Skip to content

BaseTypeSignature constants reference ScanResult and prevent GC #419

@protogenes

Description

@protogenes

The constants in BaseTypeSignature reference a ScanResult.

  • As a result it cannot be garbage collected and after the fix for LoadClass keeps a reference to ScanResult #399 the closed instance's remaining memory footprint has a gravely increased.
  • In a concurrent situation when using multiple ScanResults this is not threadsafe
  • It is confusing to have an eventually changing ownership of those constants

The ownership seems to be set up by method return types

this.resultType.setScanResult(scanResult);

Is the scanResult reference even required for the native type signatures? Maybe each static constant should be replaced with a value per ScanResult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions