No, the hash table will not copy the key and the value for you; since it is generic, it cannot know what type exactly you passed and that’s why can pass custom free functions (g_free in your case) in the constructor.
What you are doing is basically creating a double free on g_hash_table_destroy (if that’s the question)
Whether or not to use g_hash_table_destory on its own or g_clear_pointer is mainly depending on whether you will encounter the hash table again after the destroy and rely on it being NULL