3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-23 04:38:53 +00:00

use scoped pointers instead of explicit deallocation (robust under exceptions)

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-06-11 10:19:29 -07:00
parent 94f8ecb06d
commit 868b430b8b
2 changed files with 6 additions and 12 deletions

View file

@ -914,9 +914,8 @@ namespace datalog {
relation_manager & r_manager = s.get_manager();
const relation_signature & r_sig = s.get_signature();
table_min_fn * fn = r_manager.mk_min_fn(source_t, m_group_by_cols, m_min_col);
scoped_ptr<table_min_fn> fn = r_manager.mk_min_fn(source_t, m_group_by_cols, m_min_col);
table_base * target_t = (*fn)(source_t);
dealloc(fn);
TRACE("dl",
tout << "% ";