Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
Adobe Flex SDK 4.0 (Release)
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
Build this AIR app:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:comp="components.*" width="200" height="200" creationComplete="onCreationComplete(event)">
<fx:Script>
<![CDATA[
import mx.binding.utils.BindingUtils;
import mx.events.FlexEvent;
protected function button1_clickHandler(event:MouseEvent):void
{ System.gc(); }protected function onCreationComplete(event:FlexEvent):void
{ BindingUtils.bindProperty(myLabel, "text", myEdit, "text", false, true); } ]]
>
</fx:Script>
<s:SkinnableContainer width="100%" height="100%">
<s:VGroup gap="10">
<s:Button label="GC" click="button1_clickHandler(event)" />
<s:TextInput id="myEdit"/>
<s:Label id="myLabel"/>
</s:VGroup>
</s:SkinnableContainer>
</s:WindowedApplication>
Run the app.
Type in the editbox(the label should update to show the same text as the editbox)
Click the GC button.
Type in the editbox
Actual Results:
Running the garbage collector destroys the binding.
Expected Results:
Binding remains after GC runs.
Workaround (if any):
Setting the weak reference flag to false works around the bug, but also defeats the weak reference I wanted...