Skip to content

Memory leak? #61

Description

@yuui

I wrote a snippet with zookeeper gem, and got some kind of memory leak problem.

Ruby version:

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin12.0]

Gem version:

zookeeper (1.4.8)

Zookeeper server installed with Homebrew:

zookeeper: stable 3.4.6 (bottled), HEAD
$ irb
irb(main):001:0> require 'zookeeper'
=> true
irb(main):002:0> cli = Zookeeper.new("localhost:2181")
=> #<Zookeeper::Client:0x007fd7648aedd0 @host="localhost:2181", ...

At this time, I see this irb process uses 12.4MB memory with Activity Monitor on OS X.
And I run the following code:

rb(main):003:0> loop { cli.get_chidldren(path: "/") }

Then the memory size rises and rises to 17.1MB beyond 12.4MB while running.
I stop this infinite loop with Ctrl+C after about 10 second from starting, but Activity Monitor keeps showing 17.1MB.

Is this some memory leak? Or another reason?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions