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

Method Free

src/backend/gpopt/utils/COptTasks.cpp:124–153  ·  view source on GitHub ↗

--------------------------------------------------------------------------- @function: SOptContext::Free @doc: Free all members except those pointed to by either input or output ---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

122//
123//---------------------------------------------------------------------------
124void
125SOptContext::Free(SOptContext::EPin input, SOptContext::EPin output) const
126{
127 if (nullptr != m_query_dxl && epinQueryDXL != input &&
128 epinQueryDXL != output)
129 {
130 gpdb::GPDBFree(m_query_dxl);
131 }
132
133 if (nullptr != m_query && epinQuery != input && epinQuery != output)
134 {
135 gpdb::GPDBFree(m_query);
136 }
137
138 if (nullptr != m_plan_dxl && epinPlanDXL != input && epinPlanDXL != output)
139 {
140 gpdb::GPDBFree(m_plan_dxl);
141 }
142
143 if (nullptr != m_plan_stmt && epinPlStmt != input && epinPlStmt != output)
144 {
145 gpdb::GPDBFree(m_plan_stmt);
146 }
147
148 if (nullptr != m_error_msg && epinErrorMsg != input &&
149 epinErrorMsg != output)
150 {
151 gpdb::GPDBFree(m_error_msg);
152 }
153}
154
155//---------------------------------------------------------------------------
156// @function:

Callers 3

GPOPTOptimizedPlanMethod · 0.45
GPOS_CATCH_EXFunction · 0.45
OptimizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected