fixes memory leak in context
only use retain for copys
retain context because it is a copy of an older ctx
Merge pull request #22 from wallnuss/memory_leak

[WIP] memory leak