fixed memory leaks in ezexample