Clarify pointer ownership (fix issue #395)