twa::~twa should call unregister_all_my_variables()
On Wed, Jan 6, 2016 at 7:34 PM, Miriam Blank sent the following question:
This code prints errors. How can I avoid them?
code:
spot::bdd_dict_ptr dict = spot::make_bdd_dict(); spot::kripke_ptr model = std::make_shared<MyKripke>(dict); model->register_ap("p");
errors:
some maps are not empty Variable Map: 0 Var[p] x1 { 0xb32fd0 } 1 Free Anonymous lists: [0] Free list: (1, 1) Aborted
The current solution to put get_dict()->unregister_all_my_variables(this);
in the destructor of MyKripke
is not very elegant.
Since we introduced twa::register_ap()
to hide most of the interactions with the bdd_dict, it should probably be cleaner if unregister_all_my_variables()
was called in the twa destructor so that it is not necessary to call it in the destructor of every subclass.