Also, I was never quite sure about using ptr_remove vs ent_remove.

Since ent_remove mentions that it retains the resources in memory, and ptr_remove does not mention this, perhaps ptr_remove actually removes the resources too...