removing pointerToMatrix