<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -694,6 +694,8 @@ module Roby
 	    return if @unreachable
 	    @unreachable = true
 
+            EventGenerator.event_gathering.delete(self)
+
 	    unreachable_handlers.each do |_, block|
 		begin
 		    block.call(reason)</diff>
      <filename>lib/roby/event.rb</filename>
    </modified>
    <modified>
      <diff>@@ -772,6 +772,7 @@ class TC_Event &lt; Test::Unit::TestCase
 	# removed from the plan
 	collection.clear
 	plan.remove_object(e1)
+        assert(!EventGenerator.event_gathering.has_key?(e1))
 
 	EventGenerator.remove_event_gathering(collection)
     end</diff>
      <filename>test/test_event.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a350e81f184577df8d946dcd451bf204e8b9dfbd</id>
    </parent>
  </parents>
  <author>
    <name>Sylvain Joyeux</name>
    <email>sylvain.joyeux@dfki.de</email>
  </author>
  <url>http://github.com/doudou/roby/commit/0b777b8f4b494c7e88fa83d2d8fe683dbd1b34dc</url>
  <id>0b777b8f4b494c7e88fa83d2d8fe683dbd1b34dc</id>
  <committed-date>2008-06-04T08:58:10-07:00</committed-date>
  <authored-date>2008-06-04T08:58:10-07:00</authored-date>
  <message>[core] fix bug and memory leak related to EventGenerator.gather_events

  .gather_events has been designed to have the propagation code push the
  set of fired events in collections, so that plan analysis code can
  avoid iterating on the whole plan to find the interesting events.

  Until now, the automatic de-registration of the events when they
  become unreachable was actually not done, resulting in a memory leak.
  This commit fixes it -- and updates the test suite so that it does not
  appear anymore.</message>
  <tree>629c5b4c071a53302632134ec6790dc7e16d6dd6</tree>
  <committer>
    <name>Sylvain Joyeux</name>
    <email>sylvain.joyeux@dfki.de</email>
  </committer>
</commit>
