c++ - Where are the memory leaks? 2d array class -
i submitted program class , error message says there few memory leaks, cannot find them (i asked professor) here error message: ==27796== heap summary: ==27796== in use @ exit: 160 bytes in 2 blocks ==27796== total heap usage: 192 allocs, 190 frees, 21,989 bytes allocated ==27796== ==27796== 160 bytes in 2 blocks lost in loss record 1 of 1 ==27796== @ 0x402adfc: operator new[](unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==27796== 0x804d5c2: sweepergrid::sweepergrid(sweepergrid const&) (in /tmp/grading20151030-8173-zfd6af-0/sweepertest) ==27796== 0x804bf57: main (sweepertest.cpp:357) and following code use new or delete: // explicit-value constructor sweepergrid::sweepergrid(const int initialrows, const int initialcols, const int density){ if ((initialrows<5 || initialcols<5) || (density<25 || density>75)) { throw out_of_range("grid not large enough (number of rows or columns cannot fewer 5) or dens