Github user shinrich commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/752#discussion_r68775437
  
    --- Diff: proxy/InkAPI.cc ---
    @@ -1037,43 +1047,36 @@ INKVConnInternal::INKVConnInternal(TSEventFunc 
funcp, TSMutex mutexp)
       : INKContInternal(funcp, mutexp), m_read_vio(), m_write_vio(), 
m_output_vc(NULL)
     {
       m_closed = 0;
    -  SET_HANDLER(&INKVConnInternal::handle_event);
     }
     
     void
    -INKVConnInternal::init(TSEventFunc funcp, TSMutex mutexp)
    +INKVConnInternal::clear()
     {
    -  INKContInternal::init(funcp, mutexp);
    -  SET_HANDLER(&INKVConnInternal::handle_event);
    +  m_read_vio.set_continuation(NULL);
    +  m_write_vio.set_continuation(NULL);
    +  INKContInternal::clear();
     }
     
     void
    -INKVConnInternal::destroy()
    +INKVConnInternal::free()
     {
    -  m_deleted = 1;
    -  if (m_deletable) {
    -    this->mutex = NULL;
    -    m_read_vio.set_continuation(NULL);
    -    m_write_vio.set_continuation(NULL);
    -    INKVConnAllocator.free(this);
    -  }
    +  clear();
    +  this->mutex.clear();
    +  m_free_magic = INKCONT_INTERN_MAGIC_DEAD;
    +  INKVConnAllocator.free(this);
     }
     
    -int
    -INKVConnInternal::handle_event(int event, void *edata)
    --- End diff --
    
    Where did the INKVConnInternal::handle_event go?  Why is it not needed?  Do 
we not worry about destroying InkVConnInternal objects on the stack and leaving 
live references to hit as we unwind the stack? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to