Select to view content in your preferred language

flexviewer leak

1302
4
Jump to solution
08-27-2014 03:39 PM
LefterisKoumis
Frequent Contributor

I created my own widget to be used in flexviewer but I get the message "To resolve the leak, define com.esri.ags.geometry.WebMercatorMapPoint in the top-level application."

I already saw a recommendation to resolve this issue is to

import com.esri.ags.geometry.MapPoint; in your main mxml.

The widget has aleady this import, so in flexviewer the top-level application is considered to be what?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   I am very surprised that neither of those worked to remove the warning for you. I have used those methods in the past and the warning went away... As far as the reality of the warning. No there is very minimal chance of this becoming a serious issue for your widget. As there are many widgets out there that have these type of warnings and are not encountering a memory leak issue.

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

  This is a common warning that widget developers will get in Flash Builder 4.7 (it was never displayed in earlier versions). The only way to get rid of this warning is to add your import that the warning is talking about to the main mxml (which means the index.mxml) thought this is not the best place for this instead add it to the com.esri.viewer.ForcedImports.as file (this is how esri gets around the warning). You will notice in that file you add the import and then just type the object:

import com.esri.ags.tasks.PrintTask;

import com.esri.ags.geometry.MapPoint;

PrintTask;

MapPoint;

0 Kudos
LefterisKoumis
Frequent Contributor

Thank you Robert. My first reaction when I encountered that error was to enter the import in the index.html but it didn't prevent the error. Then, I implemented your suggestions, but I still get the error. I am using Flash Builder 4.6. If I ignore this error,  will actually result to serious memory leaks?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   I am very surprised that neither of those worked to remove the warning for you. I have used those methods in the past and the warning went away... As far as the reality of the warning. No there is very minimal chance of this becoming a serious issue for your widget. As there are many widgets out there that have these type of warnings and are not encountering a memory leak issue.

0 Kudos
LefterisKoumis
Frequent Contributor

Ok. I will just ignore the warning and move on. Thank you Robert.

0 Kudos