MCPcopy Create free account
hub / github.com/apache/cloudberry / FreeExprContext

Function FreeExprContext

src/backend/executor/execUtils.c:467–483  ·  view source on GitHub ↗

---------------- * FreeExprContext * * Free an expression context, including calling any remaining * shutdown callbacks. * * Since we free the temporary context used for expression evaluation, * any previously computed pass-by-reference expression result will go away! * * If isCommit is false, we are being called in error cleanup, and should * not call callbacks but only release memor

Source from the content-addressed store, hash-verified

465 * ----------------
466 */
467void
468FreeExprContext(ExprContext *econtext, bool isCommit)
469{
470 EState *estate;
471
472 /* Call any registered callbacks */
473 ShutdownExprContext(econtext, isCommit);
474 /* And clean up the memory used */
475 MemoryContextDelete(econtext->ecxt_per_tuple_memory);
476 /* Unlink self from owning EState, if any */
477 estate = econtext->ecxt_estate;
478 if (estate)
479 estate->es_exprcontexts = list_delete_ptr(estate->es_exprcontexts,
480 econtext);
481 /* And delete the ExprContext node */
482 pfree(econtext);
483}
484
485/*
486 * ReScanExprContext

Callers 6

plpgsql_destroy_econtextFunction · 0.85
plpgsql_subxact_cbFunction · 0.85
ExecEndIndexOnlyScanFunction · 0.85
ExecEndBitmapIndexScanFunction · 0.85
FreeExecutorStateFunction · 0.85
ExecEndIndexScanFunction · 0.85

Calls 3

ShutdownExprContextFunction · 0.85
list_delete_ptrFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected