trying to locate the memory leaking problem in mac