Exemple #1
0
SelectionCollection::Impl::~Impl()
{
    clearSymbolTable();
    // The tree must be freed before the SelectionData objects, since the
    // tree may hold references to the position data in SelectionData.
    sc_.root.reset();
    sc_.sel.clear();
    for (int i = 0; i < sc_.nvars; ++i)
    {
        sfree(sc_.varstrs[i]);
    }
    sfree(sc_.varstrs);
    gmx_ana_index_deinit(&sc_.gall);
    if (sc_.mempool)
    {
        _gmx_sel_mempool_destroy(sc_.mempool);
    }
}
SelectionCollection::Impl::~Impl()
{
    _gmx_selelem_free_chain(_sc.root);
    SelectionList::const_iterator isel;
    for (isel = _sc.sel.begin(); isel != _sc.sel.end(); ++isel)
    {
        delete *isel;
    }
    for (int i = 0; i < _sc.nvars; ++i)
    {
        sfree(_sc.varstrs[i]);
    }
    sfree(_sc.varstrs);
    gmx_ana_index_deinit(&_sc.gall);
    if (_sc.mempool)
    {
        _gmx_sel_mempool_destroy(_sc.mempool);
    }
    if (hasFlag(efOwnPositionCollection))
    {
        gmx_ana_poscalc_coll_free(_sc.pcc);
    }
    clearSymbolTable();
}