Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-28-2009, 08:29 PM #1
- Join Date
- May 2009
- Thanked 0 Times in 0 Posts
Need Alternative for enterFrame event (Causing Memory leak )
I am facing a callBack lost issue ExternalInterface,what is happening is as soon as you hide Flex application by opening another application(any app) and then again you come back to your flex app , call back does not work , they are broken.I found following related jira for this.
To solve this issue , I am re-registering all callBacks on ENTER_FRAME event and issue appears to be solved but this is leading to memory leak.
Neither Activate nor FocusEvent.FOCUS_IN does serve my purpose , both required a mouse Clk before they dispached.
Workaroud for any of the above will solve my problem. I am wondering If there is any event which gets fired when I swich back to the flex app again.
My application is hosted as ActiveX control and I m calling callback from Dot Net application.
05-29-2009, 06:09 PM #2
- Join Date
- Oct 2008
- Long Beach
- Thanked 167 Times in 167 Posts
You can run an onEnterFrame that uses a JS call to the browser window hosting your app and requests the window's outerWidth/Height dimensions. If the dimensions fall below 200 it's likely the window has been minimized. If the browser is minimized, then maximized again, then you can re-initialize your handlers. This may cause less of a memory leak then re-reging all your handlers every frame, but then again it may not.
You could also consider re-reging every third frame or something. This would at least cut the script down considerably.Feel free to e-mail me if I forget to respond ;)