MCPcopy Create free account
hub / github.com/apache/trafficserver / TSMBufferDestroy

Function TSMBufferDestroy

src/api/InkAPI.cc:885–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883}
884
885TSReturnCode
886TSMBufferDestroy(TSMBuffer bufp)
887{
888 // Allow to modify the buffer only
889 // if bufp is modifiable. If bufp is not modifiable return
890 // TS_ERROR. If allowed, return TS_SUCCESS. Changed the
891 // return value of function from void to TSReturnCode.
892 if (!isWriteable(bufp)) {
893 return TS_ERROR;
894 }
895
896 sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS);
897 HdrHeapSDKHandle *sdk_heap = reinterpret_cast<HdrHeapSDKHandle *>(bufp);
898 sdk_heap->m_heap->destroy();
899 delete sdk_heap;
900 return TS_SUCCESS;
901}
902
903////////////////////////////////////////////////////////////////////
904//

Callers 15

setup_requestFunction · 0.85
~AsyncHttpFetchStateMethod · 0.85
~RequestMethod · 0.85
resetMethod · 0.85
~StateMethod · 0.85
~GeneratorHttpHeaderMethod · 0.85

Calls 3

isWriteableFunction · 0.85
sdk_sanity_check_mbufferFunction · 0.85
destroyMethod · 0.45