maskit commented on code in PR #9474:
URL: https://github.com/apache/trafficserver/pull/9474#discussion_r1121064750


##########
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:
   I thought I may be able to calculate the minimal size but realized that  it 
requires including header files for SHA256 and MD5.



-- 
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]

Reply via email to