updated xtc implementation to prevent memory leaks

(the previous implementation would cache methods and prevent the BDD from getting garbage collected)