Update mem_retain to return the retained pointer
Merge pull request #25 from mikedlowis/mem-module

Update mem_retain to return the retained pointer

closes issue #22