• E
    Refactor and cleanup of memory management of the new optimizer. · 9e5dd61a
    Entong Shen 提交于
    This commit eliminates the global new/delete overrides that were causing
    compatibility problems (the Allocators.(h/cpp/inl) files have been
    completely removed). The GPOS `New()` macro is retained and works the
    same way, but has been renamed `GPOS_NEW()` to avoid confusion and
    possible name collisions. `GPOS_NEW()` works only for allocating
    singleton objects. For allocating arrays, `GPOS_NEW_ARRAY()` is
    provided. Because we no longer override the global delete,
    objects/arrays allocated by `GPOS_NEW()` and `GPOS_NEW_ARRAY()` must now
    be deleted by the new functions `GPOS_DELETE()` and
    `GPOS_DELETE_ARRAY()` respectively. All code in GPOS has been
    retrofitted for these changes, but Orca and other code that depends on
    GPOS should also be changed.
    
    Note that `GPOS_NEW()` and `GPOS_NEW_ARRAY()` should both be
    exception-safe and not leak memory when a constructor throws.
    
    Closes #166
    9e5dd61a
CDXLTranslateContextBaseTable.cpp 4.0 KB