Have you freed m_factors_table and m_factor_scope somewhere?