--------------------------------------------------------------------------- @function: SOptContext::Free @doc: Free all members except those pointed to by either input or output ---------------------------------------------------------------------------
| 122 | // |
| 123 | //--------------------------------------------------------------------------- |
| 124 | void |
| 125 | SOptContext::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: |
no outgoing calls
no test coverage detected