You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/04/26 14:29:00 UTC

[GitHub] [arrow] felipecrv commented on pull request #35340: MINOR: [C++] Add missing RunEndEncodedType dtor

felipecrv commented on PR #35340:
URL: https://github.com/apache/arrow/pull/35340#issuecomment-1523520894

   > Just curious why need a explicit dtor here, seems that it can benifits LTO?
   
   Since we don't mark these classes `final`, they can be extended by users and without a virtual dtor (that's what the `override` means -- virtual), users can get into issues if they destroy the instance via the base interface [1].
   
   Making the dtor non-inline is good for binary size reduction and should have little perf impact as type destruction is not part of hot loops in Arrow. [2]
   
   [1] https://stackoverflow.com/questions/461203/when-to-use-virtual-destructors
   [2] https://chromium.googlesource.com/chromium/src/+/HEAD/docs/speed/binary_size/optimization_advice.md#optimizing-native-code


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org