BUG: potential memory leaks in HashPtrTable (#1787)
- using HashPtrTable::set() with the same key twice did not guarantee proper cleanup of memory since it simply used the underlying HashTable::set() without doing anything about the old memory. Now check for pre-existing storage and delete it when it does not correspond to the newly stored pointer. This problem is independent of potential memory slicing previously flagged (#1286) and only partially resolved.
Showing with 12 additions and 2 deletions