You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/01/14 02:49:09 UTC

git commit: [flex-sdk] [refs/heads/release4.14.0] - prevent memory leak

Repository: flex-sdk
Updated Branches:
  refs/heads/release4.14.0 e7b498e09 -> 42cdd44b8


prevent memory leak


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/42cdd44b
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/42cdd44b
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/42cdd44b

Branch: refs/heads/release4.14.0
Commit: 42cdd44b80cfb6b28bb72176183f116c9f537dc8
Parents: e7b498e
Author: Alex Harui <ah...@apache.org>
Authored: Tue Jan 13 17:49:01 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Jan 13 17:49:01 2015 -0800

----------------------------------------------------------------------
 .../src/spark/skins/mobile/BusyIndicatorSkin.as         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/42cdd44b/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as b/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
index d56f6bd..040bf53 100644
--- a/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
+++ b/frameworks/projects/mobiletheme/src/spark/skins/mobile/BusyIndicatorSkin.as
@@ -23,6 +23,7 @@ package spark.skins.mobile
 	import flash.display.CapsStyle;
 	import flash.display.Graphics;
 	import flash.display.LineScaleMode;
+	import flash.events.Event;
 	import flash.events.TimerEvent;
 	import flash.geom.Point;
 	import flash.utils.Timer;
@@ -60,6 +61,8 @@ package spark.skins.mobile
 		{
 			super();
 			alpha = 0.60;       // default alpha
+            // component changes state when removed but it doesn't get validated in time
+            addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler,false,0,true);
 		}
 		
 		private var _hostComponent:spark.components.BusyIndicator;
@@ -453,5 +456,14 @@ package spark.skins.mobile
 			event.updateAfterEvent();
 		}
 		
+        /**
+         *  @private
+         */
+        private function removedFromStageHandler(event:Event):void
+        {
+            stopRotation();
+        }
+        
+
 	}
 }
\ No newline at end of file