LearnProgramming/libastar — pull request #21 by jgulotta (2012-12-29 02:25:19+00:00)
Title: Replace std::shared_ptr with std::unique_ptr and raw pointers

Addresses #19.

Decided HeapSet should be A* specific, and thus did the following:
- Removed the optional ability to close nodes since A* always wants that
- Always use a std::map, bool> to allow closing states without unnecessary copies
- Renamed it back to HeapSet from CachingHeapSet

Improved use of move semantics and perfect forwarding.

Memory use and allocations went down across the board, even from their historical best.

Small 2x2
---
Before: total heap usage: 118 allocs, 118 frees, 48,803 bytes allocated
After: total heap usage: 103 allocs, 103 frees, 47,405 bytes allocated

Medium 3x3
---
Before: total heap usage: 23,740 allocs, 23,740 frees, 2,009,883 bytes allocated
After: total heap usage: 21,199 allocs, 21,199 frees, 1,535,437 bytes allocated