proxygen
folly::RequestData::DestructPtr Struct Reference

Public Member Functions

void operator() (RequestData *ptr)
 

Detailed Description

Definition at line 98 of file Request.h.

Member Function Documentation

void folly::RequestData::DestructPtr::operator() ( RequestData ptr)

Definition at line 65 of file Request.cpp.

References folly::RequestData::keepAliveCounter_, and ptr.

65  {
66  if (ptr) {
67  auto keepAliveCounter =
68  ptr->keepAliveCounter_.fetch_sub(1, std::memory_order_acq_rel);
69  // Note: this is the value before decrement, hence == 1 check
70  DCHECK(keepAliveCounter > 0);
71  if (keepAliveCounter == 1) {
72  delete ptr;
73  }
74  }
75 }
void * ptr

The documentation for this struct was generated from the following files: