Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-178

Final Keyword

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      This introduces support for the final keyword in the thrift IDL. A C++ thrift struct that is declared final loses it's virtual dtor, which saves the memory overhead of one vtable per instance. This (along with the required keyword) can be very helpful if you're passing around big lists of small thrift structs.

      This patch also includes modifications for the java generator to recognize and apply final. I'm not familiar enough with the other languages to know if this notion applies to them.

      (A patch for this was submitted in thrift's pre-apache days and was met with approval, but then fell off the radar, so I'm trying again.)

      Attachments

        1. final_annotation_cpp_java_csharp_v2.patch
          3 kB
          Erik Frey
        2. final_annotation_cpp_java_csharp_v3.patch
          3 kB
          Erik Frey
        3. final_annotation_cpp_java_csharp.patch
          2 kB
          Erik Frey
        4. final_csharp.patch
          0.5 kB
          Michael Greene
        5. keyword_final_cpp_java.patch
          4 kB
          Erik Frey

        Activity

          People

            erikfrey Erik Frey
            erikfrey Erik Frey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: