standardised hashmap destroy api to fit with existing