observer for memory leak with c and objective c