[MacRuby-devel] Nokogiri leaks

2011-05-28 Thread 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('TEST ')
 p = doc.css("p")[0].text
 print p
end
--



-- 
Guido




___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Re: Nokogiri leaks

2011-05-28 Thread Watson
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('TEST ')
>  p = doc.css("p")[0].text
>  print p
> end
> --
> 
> 
> 
> -- 
> Guido
> 
> 
> 
> 
> ___
> MacRuby-devel mailing list
> [email protected] (mailto:[email protected])
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Can't run ack subprocess

2011-05-28 Thread Majd Taby
Hey there,

I'm trying to build a gui around the ack (betterthangrep.com) utility. I've 
built this before, and it worked great (macruby 0.7) but now I can't seem to 
get it to run. I was wondering if you could help me figure it out.

https://gist.github.com/997085

In that gist, you'll find the code I'm using as well as the output generated. 
Interesting thing is, if I run that sequence of commands manually, it generates 
the expected output.

If you need more information from me, let me know.

- Majd


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Re: Nokogiri leaks

2011-05-28 Thread Laurent Sansonetti
The free function pointer is not honored by MacRuby, yet. But it can
be done :) Can you file a ticket?

Thanks,
Laurent

On Sat, May 28, 2011 at 8:07 AM, Watson  wrote:
> 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('TEST ')
> p = doc.css("p")[0].text
> print p
> end
> --
>
>
>
> --
> Guido
>
>
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel