Memory leaks are pretty hard to detect in flex. I would be concerned
if the memory continued to leak after a significant time duration.
Flex's garbage collection only happens during the allocation phase.

See the following link for more info on gc in flex:

http://blogs.adobe.com/aharui/2007/03/garbage_collection_and_memory.html



On Mar 26, 10:41 am, Saxon <[email protected]> wrote:
> Thanks Pamela.
>
> It's compiled with a target frame rate of 30 fps, and I was just using
> task manager.
>
> It seems to be a bit unpredictable - today it is working fine for me
> in FF3, but I still get the problem in IE7.
>
> I've uploaded it tohttp://test.saxon.cx/test1/in case it's a
> difference in compilation settings. The source there contains a
> FlashDevelop 3.00 RC2 project.
>
> According tohttp://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507
> I have version 10.0.22.87 of Flash (non-debug).
>
> The memory does seem to be reclaimed every so often, after about 30 to
> 75 MB has been allocated. It might just be that the garbage collector
> isn't working very well, but 500k per second at 30fps = about 16k
> allocated per marker move, which seems like a lot?
>
> Thanks,
> Saxon
>
> On Mar 26, 12:00 am, pamela fox <[email protected]> wrote:
>
>
>
> > Hi Saxon-
> > I'm running that code in FF3 on Windows, and am not seeing any significant
> > increased memory usage using Windows Task Manager.
>
> > How are you monitoring the memory, and should I be doing something
> > particular to run this at 30 FPS?
>
> > - pamela
>
> > On Tue, Mar 24, 2009 at 12:38 AM, Saxon <[email protected]> wrote:
>
> > > Hi,
>
> > > I want to be able to move a marker dynamically, but calling
> > > Marker.setLatLng() seems to leak memory when I call it repeatedly.
>
> > > The following cut down example mxml leaks about 500k per second, when
> > > run at 30fps:
>
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application
> > >        xmlns:mx="http://www.adobe.com/2006/mxml";
> > >        layout="absolute"
> > >        enterFrame="onEnterFrame(event)">
> > >        <maps:Map
> > >                xmlns:maps="com.google.maps.*"
> > >                id="map"
> > >                mapevent_mapready="onMapReady(event)"
> > >                mapevent_mappreinitialize="onMapPreinitialize(event)"
> > >                width="640"
> > >                height="480"
> > >                key="my-api-key"/>
> > >        <mx:Script>
> > >                <![CDATA[
> > >                        import com.google.maps.LatLng;
> > >                        import com.google.maps.MapType;
> > >                        import com.google.maps.MapOptions;
> > >                        import com.google.maps.overlays.Marker;
>
> > >                        private var marker:Marker = null;
>
> > >                        private var mapCentre:LatLng = new LatLng(-33.8804,
> > > 151.1912);
>
> > >                        private function
> > > onMapPreinitialize(event:Event):void
> > >                        {
> > >                                var mapOptions:MapOptions = new
> > > MapOptions();
> > >                                mapOptions.zoom = 20;
> > >                                mapOptions.center = mapCentre;
> > >                                mapOptions.mapType =
> > > MapType.SATELLITE_MAP_TYPE;
> > >                                this.map.setInitOptions(mapOptions);
> > >                        }
>
> > >                        private function onMapReady(event:Event):void
> > >                        {
> > >                                marker = new Marker(mapCentre);
> > >                                this.map.addOverlay(marker);
> > >                        }
>
> > >                        private function onEnterFrame(event:Event):void
> > >                        {
> > >                                if (marker != null)
> > >                                        marker.setLatLng(mapCentre);
> > >                        }
> > >                ]]>
> > >        </mx:Script>
> > > </mx:Application>
>
> > > The leak occurs in both IE7 and firefox 3.
>
> > > Is it something I am doing wrong?
>
> > > Thanks,
> > > Saxon- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to