mgsloan/rex — pull request #4 by takano-akio (2013-02-03 11:36:38+00:00)
Title: An unsafe use of unsafePackCStringLen

The use of unsafePackCStringLen was unsafe because nothing
prevented the pcre object from garbage collected.

With this patch, I no longer see 'out of memory' errors. However with my test case, 'out of memory' also goes away when I make a small unrelated change like adding a print statement. So I'm not 100% sure that this commit fixes the issue.