Fixed a minor type issue.
- Added missing assertion checks for pmap_.
- Memory for pmap_ is now released when clear() is called.