I've had look at ent_create for .hmp files and still have the same problem of not releasing memory on ent_remove with or without ent_purge.