removed memory leaks in streamCallBack