Skip to content

Commit

Permalink
a w/a for celluloid issue #495(actors are not properly removed by the…
Browse files Browse the repository at this point in the history
… GC): delete all instance variables of the dead actors
  • Loading branch information
niamster committed Mar 22, 2015
1 parent f2badfa commit 61d4e0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/dcell/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def shutdown
NodeCache.delete @id
MailboxManager.delete Thread.mailbox
Logger.info "Disconnected from #{@id}"
instance_variables.each { |iv| remove_instance_variable iv }
end

# Obtain socket for relay messages
Expand Down
1 change: 1 addition & 0 deletions lib/dcell/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def shutdown
@socket.write msg
end
@socket.close
instance_variables.each { |iv| remove_instance_variable iv }
end

def write(id, msg)
Expand Down

0 comments on commit 61d4e0d

Please sign in to comment.