summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/relevant_domain.cpp
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2016-11-02 12:42:25 -0500
committerajreynol <andrew.j.reynolds@gmail.com>2016-11-02 12:42:25 -0500
commit81c1bee05d9d7c323f49d33554a523f8f4fbf387 (patch)
tree2c776f89051a6904dfde4c96332a0e61ca8a03fe /src/theory/quantifiers/relevant_domain.cpp
parent6404d4f5f65eefbcc91c733f04942d6cb817f46a (diff)
Fix a few obvious memory leaks in sygus and quantifiers. Minor fix cvc3_compat.
Diffstat (limited to 'src/theory/quantifiers/relevant_domain.cpp')
-rw-r--r--src/theory/quantifiers/relevant_domain.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/theory/quantifiers/relevant_domain.cpp b/src/theory/quantifiers/relevant_domain.cpp
index b4b51fd84..8166925c6 100644
--- a/src/theory/quantifiers/relevant_domain.cpp
+++ b/src/theory/quantifiers/relevant_domain.cpp
@@ -73,6 +73,16 @@ RelevantDomain::RelevantDomain( QuantifiersEngine* qe, FirstOrderModel* m ) : d_
d_is_computed = false;
}
+RelevantDomain::~RelevantDomain() {
+ for( std::map< Node, std::map< int, RDomain * > >::iterator itr = d_rel_doms.begin(); itr != d_rel_doms.end(); ++itr ){
+ for( std::map< int, RDomain * >::iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2 ){
+ RDomain * current = (*itr2).second;
+ Assert( current != NULL );
+ delete current;
+ }
+ }
+}
+
RelevantDomain::RDomain * RelevantDomain::getRDomain( Node n, int i, bool getParent ) {
if( d_rel_doms.find( n )==d_rel_doms.end() || d_rel_doms[n].find( i )==d_rel_doms[n].end() ){
d_rel_doms[n][i] = new RDomain;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback