Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-6163

ModuleFactory should use maps with soft values

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • Could
    • Resolution: Fixed
    • None
    • Core 2.7.0
    • None
    • None
    • Medium

    Description

      As initially suggested on Talk, we should change the static entries in the ModuleFactory class to store the values as SoftReferences rather than the keys, since the keys are almost always Strings, which are not garbage collected, the use of WeakHashMaps here doesn't function as expected. In this case, SoftReferences should be favoured in place of WeakReferences because they are less aggressively GC'ed, meaning they are less likely to be deleted, e.g., during a refresh.

      Gliffy Diagrams

        Attachments

          Activity

            People

              ibacher Ian Bacher
              ibacher Ian Bacher
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: