Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: C Extensions
-
Labels:None
-
Number of attachments :
Description
When a cext call returns, and it is the last level of invocation (e.g. in a ruby -> cext -> ruby -> cext sequence), then the RString and RArray pointers are reset (set to NULL), but the memory allocated for these values is not freed. Also, since these values are nulled out, when the RubyString or RubyArray object is collected, the memory won't be freed then, either.
This used to be done by a finalizer on an associated RString or RArray java proxy, but it looks like those classes aren't used anymore.
Fixed in commit 2f2b5c87cc0f86b52312d0e12b87c3a3814496bd