Remove ResourceScope-less overload from API

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • None
    • Affects Version/s: repo-panama
    • Component/s: tools

      Overload methods which do not take a ResourceScope (hence, they use an implicit scope instead) create some opportunities for bugs to hide; consider;

      try (ResourceScope scope = ResourceScope.ofConfined()) {
          MemorySegment str = CLinker.toCString("hello");
      }

      It is really hard for humans to see that the C string allocation does not use the outer scope (as the TWR block is visually very imposing, whereas implicit scope here is denoted by "absence").

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: