Refactor usages of ReferenceCounted such that the retain method is used in a consistent manner

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ReferenceCounted.retain is supposed to be called each time we store a new reference to a ReferenceCounted object in the process heap. However, for various reasons, including the fact that manual reference counting is difficult, we sometimes

      As a result, it is very difficult (at least to me, but maybe I am not the only one) to reason about the code that uses reference counting. To improve the matters, we could

      • refactor all existing usages of ReferenceCounted such that retain is always called immediately before (in the program order) the write action that stores a new reference in the process heap;
      • urge ourselves to follow the approach taken in the aforementioned refactoring.

            Assignee:
            Unassigned
            Reporter:
            Valentin Kavalenka
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: