Call the MemoryManager instead of new double[N][N]