zizhong commented on a change in pull request #6858:
URL: https://github.com/apache/trafficserver/pull/6858#discussion_r438944875



##########
File path: iocore/hostdb/I_HostDBProcessor.h
##########
@@ -146,16 +146,17 @@ struct HostDBInfo : public RefCountObj {
     ink_release_assert(iobuffer_index >= 0);
     void *ptr = ioBufAllocator[iobuffer_index].alloc_void();
     memset(ptr, 0, size);
-    HostDBInfo *ret     = new (ptr) HostDBInfo();
-    ret->iobuffer_index = iobuffer_index;
+    HostDBInfo *ret      = new (ptr) HostDBInfo();
+    ret->_iobuffer_index = iobuffer_index;
     return ret;
   }
 
   void
   free() override
   {
-    Debug("hostdb", "freeing %d bytes at [%p]", (1 << (7 + iobuffer_index)), 
this);
-    ioBufAllocator[iobuffer_index].free_void((void *)(this));
+    ink_release_assert(from_alloc());

Review comment:
       >The current code requires that instances of HostDBInfo be copyable.
   Could you elaborate on that? I'll be surprised to see if any HostDBInfo is 
copied around. ^_^




----------------------------------------------------------------
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:
[email protected]


Reply via email to