| 173 | |
| 174 | public: |
| 175 | void takeOwnership (Stack<Object, Capacity>& s) |
| 176 | { |
| 177 | fb_assert(&getPool() == &s.getPool()); |
| 178 | delete stk; |
| 179 | stk = s.stk; |
| 180 | s.stk = 0; |
| 181 | |
| 182 | if (stk) |
| 183 | { |
| 184 | delete stk_cache; |
| 185 | stk_cache = 0; |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | // Push a element on the stack and pop when we go out of scope. |
| 190 | class AutoPushPop |