maskit commented on code in PR #9474:
URL: https://github.com/apache/trafficserver/pull/9474#discussion_r1128387318
##########
include/tscore/CryptoHash.h:
##########
@@ -168,26 +168,23 @@ class CryptoContext : public CryptoContextBase
}; ///< What type of hash we really are.
static HashType Setting;
- ~CryptoContext()
- {
- delete _base;
- _base = nullptr;
- }
+ ~CryptoContext() { reinterpret_cast<CryptoContextBase
*>(_base)->~CryptoContextBase(); }
private:
- CryptoContextBase *_base = nullptr;
+ static size_t constexpr OBJ_SIZE = 256;
Review Comment:
AC_CHECK_SIZEOF? Then maybe we can do std::max. Try it if you are interested.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]