Select to view content in your preferred language

Query Widget Memory Leak Problem

411
1
09-19-2011 06:13 AM
MattSheehan
Deactivated User
I am loading a Query Widget in the Flex Viewer. Flash Builder gives the following warning on load:

warning: The class widgets.Query.QueryResult has been used in a call to net.registerClassAlias() in _QueryWidget_FlexInit. This will cause widgets.Query:QueryWidget to be leaked. To resolve the leak, define widgets.Query.QueryResult in the top-level application.  

It relates to the following line in QueryResult.as:

[Bindable][RemoteClass (alias="widgets.Query.QueryResult")]

Wondered if anybody had a fix?

Thanks

--Rory
Tags (2)
0 Kudos
1 Reply
DelinWei
New Contributor
Under SDK 4.5.1, for Flexviewer 2.5, in your index.mxml, you can add these:


<s:Application
...
creationComplete="init()">


<fx:Script>
<![CDATA[
                        import flash.net.registerClassAlias;

                        import widgets.Query.*;
                        import widgets.Query.QueryResult;

                        private function init():void
  {
       registerClassAlias("widgets.Query.QueryResult", QueryResult);

                            }
]]>
</fx:Script>

You can do the same for Bookmark, or IdentifyResult or similar issuses.

HAPPY FLEX!

--------------------------------------------------
I am loading a Query Widget in the Flex Viewer. Flash Builder gives the following warning on load:

warning: The class widgets.Query.QueryResult has been used in a call to net.registerClassAlias() in _QueryWidget_FlexInit. This will cause widgets.Query:QueryWidget to be leaked. To resolve the leak, define widgets.Query.QueryResult in the top-level application.  

It relates to the following line in QueryResult.as:

[Bindable][RemoteClass (alias="widgets.Query.QueryResult")]

Wondered if anybody had a fix?

Thanks

--Rory
0 Kudos