fixed event pointer memory leaks in tools