I'm using latest github code. Memory leaks found by valgrind.
==31657== by 0x4F8EFC7: flann::NNIndex<flann::L2 >::knnSearch(flann::Matrix const&, flann::Matrix&, flann::Matrix&, unsigned long, flann::SearchParams const&) const
...
==31657== Address 0x0 is not stack'd, malloc'd or (recently) free'd
...
==32331== 2,272 bytes in 1 blocks are possibly lost in loss record 100 of 149
==32331== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
...
==32331== LEAK SUMMARY:
==32331== definitely lost: 0 bytes in 0 blocks
==32331== indirectly lost: 0 bytes in 0 blocks
==32331== possibly lost: 309,451 bytes in 23 blocks
==32331== still reachable: 4,413,090 bytes in 150 blocks
==32331== suppressed: 0 bytes in 0 blocks
==32331== Reachable blocks (those to which a pointer was found) are not shown.
==32331== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==32331==
==32331== For counts of detected and suppressed errors, rerun with: -v
==32331== ERROR SUMMARY: 24 errors from 24 contexts (suppressed: 0 from 0)
I'm using latest github code. Memory leaks found by valgrind.
==31657== by 0x4F8EFC7: flann::NNIndex<flann::L2 >::knnSearch(flann::Matrix const&, flann::Matrix&, flann::Matrix&, unsigned long, flann::SearchParams const&) const
...
==31657== Address 0x0 is not stack'd, malloc'd or (recently) free'd
...
==32331== 2,272 bytes in 1 blocks are possibly lost in loss record 100 of 149
==32331== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
...
==32331== LEAK SUMMARY:
==32331== definitely lost: 0 bytes in 0 blocks
==32331== indirectly lost: 0 bytes in 0 blocks
==32331== possibly lost: 309,451 bytes in 23 blocks
==32331== still reachable: 4,413,090 bytes in 150 blocks
==32331== suppressed: 0 bytes in 0 blocks
==32331== Reachable blocks (those to which a pointer was found) are not shown.
==32331== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==32331==
==32331== For counts of detected and suppressed errors, rerun with: -v
==32331== ERROR SUMMARY: 24 errors from 24 contexts (suppressed: 0 from 0)