[MacRuby-devel] Re: Nokogiri leaks

Watson watson1978 at gmail.com
Sat May 28 08:07:34 PDT 2011


Hi,

 I think that MacRuby needs to call a deallocating function which specified with Data_Wrap_Struct() macro.


Thank you.

日付:2011年5月28日土曜日、時刻:23:13、差出人:Guido Soranzio:

> While experimenting with array controllers and NSTableViews, I was facing huge
> memory leaks. I thought the culprits were the Cocoa bindings but I have discovered
> that the Nokogiri gem is what is causing them.
> 
> The following little test doesn't leak under Ruby 1.9.2 compiled with MacPorts,
> so it seems there is a problem with the underlying linking with libxml2 instead.
> 
> --------------------------------------------------------------
> require 'rubygems'
> require 'nokogiri'
> 
> loop do
>  doc = Nokogiri::HTML('<html><body><p>TEST </p></body></html>')
>  p = doc.css("p")[0].text
>  print p
> end
> --------------------------------------------------------------
> 
> 
> 
> -- 
> Guido
> 
> 
> 
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org (mailto:MacRuby-devel at lists.macosforge.org)
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110529/d68cdd85/attachment.html>


More information about the MacRuby-devel mailing list