a-canary commented on a change in pull request #6650: URL: https://github.com/apache/trafficserver/pull/6650#discussion_r412270168
########## File path: include/tscore/Extendible.h ########## @@ -575,6 +584,17 @@ sizeOf(size_t size = sizeof(Derived_t)) template <class Derived_t> Extendible<Derived_t>::Extendible() { ink_assert(ext::details::areFieldsFinalized()); + // don't call callConstructor until the derived class is fully constructed. + ++schema.cnt_constructed; +} + +template <class Derived_t> Extendible<Derived_t>::~Extendible() +{ + // assert callConstructors was called. + ink_assert(ext_loc); + schema.callDestructor(uintptr_t(this) + ext_loc); Review comment: I think not. schema like the type eraser field factory. callDestructor executes functors/lambdas for each field on that extendible block of memory. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org