(2010/07/09 18:28), Nikolai Weibull wrote:
> I own result, so after creating rbresult I currently have to
> immediately free it.

The problem is the ruby's GC engine cannot know if you own result.  When GC
reclaims its memory space, any shared memory regions shall not be freed, and
given it cannot say if your variable is for your own or not, the only safe way
for the collector is to copy the memory for its own.