Author: rolf
Date: 2007-11-01 14:18:56 -0500 (Thu, 01 Nov 2007)
New Revision: 88677

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/animation.cpp
Log:
* animation.cpp: AnimationStorage: unregister from registered events on
  destruction.

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-11-01 19:13:50 UTC (rev 88676)
+++ trunk/moon/src/ChangeLog    2007-11-01 19:18:56 UTC (rev 88677)
@@ -1,3 +1,8 @@
+2007-11-01  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * animation.cpp: AnimationStorage: unregister from registered events on
+         destruction.
+
 2007-11-01  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
        * text.cpp (TextBlock::SetValue): Oops - if we are setting an

Modified: trunk/moon/src/animation.cpp
===================================================================
--- trunk/moon/src/animation.cpp        2007-11-01 19:13:50 UTC (rev 88676)
+++ trunk/moon/src/animation.cpp        2007-11-01 19:18:56 UTC (rev 88677)
@@ -96,6 +96,15 @@
 {
        if (baseValue)
                delete baseValue;
+       
+       if (clock != NULL) {
+               clock->RemoveHandler (clock->CurrentTimeInvalidatedEvent, 
update_property_value, this);
+               clock->RemoveHandler (clock->CurrentStateInvalidatedEvent, 
reset_property_value, this);
+       }
+       
+       if (targetobj != NULL) {
+               targetobj->RemoveHandler (EventObject::DestroyedEvent, 
target_object_destroyed, this);
+       }
 }
 
 AnimationClock::AnimationClock (Animation/*Timeline*/ *timeline)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to