interpreter design pattern memory leaks