Hi Again,

Anyways a sample program to demonstrate the concept->

-------------------------------------
<?xml version="1.0"?>
<!-- optimize/ShowTotalMemory.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
initialize="initTimer()">
    <mx:Script><![CDATA[
        import flash.utils.Timer;
        import flash.events.TimerEvent;

        [Bindable]
        public var time:Number = 0;
        [Bindable]
        public var totmem:Number = 0;
        [Bindable]
        public var maxmem:Number = 0;



        public function initTimer():void {
            // The first parameter is the interval (in milliseconds). The
            // second parameter is number of times to run (0 means 
infinity).
            var myTimer:Timer = new Timer(1000, 0);
            myTimer.addEventListener("timer", timerHandler);
            myTimer.start();
        }

        public function timerHandler(event:TimerEvent):void {
            time = getTimer()
            totmem = flash.system.System.totalMemory;
            maxmem = Math.max(maxmem, totmem);
        }
    ]]></mx:Script>
    <mx:Form>
        <mx:FormItem label="Time:">
            <mx:Label text="{time} ms"/>
        </mx:FormItem>
        <mx:FormItem label="totalMemory:">
            <mx:Label text="{totmem} bytes"/>
        </mx:FormItem>
        <mx:FormItem label="Max. Memory:">
            <mx:Label text="{maxmem} bytes"/>
        </mx:FormItem>
    </mx:Form>
</mx:Application>
------------------------------------------------

Regards
Abhinav Mehta
MSRIT- Bangalore


----- Original Message ----- 
From: "Abhinav Mehta" <[email protected]>
To: <[email protected]>
Sent: Saturday, October 03, 2009 11:27 PM
Subject: Re: [flex_india:25612] Flex Memory Consumption


> Hi
>
> Use Flex built-in utility of porfilers. Profilers will help you to trace 
> the memory usage/consumption at the run-time with regular updates whatever 
> done at client side.....in other words, it will show you the changes in 
> memory usage when user-clicks on your page, in browser or if try to load 
> new pages thereof.
>
> Regards
> Abhinav Mehta
> MSRIT- Bangalore
>
>
>
> ----- Original Message ----- 
> From: "Amit" <[email protected]>
> To: "Flex India Community" <[email protected]>
> Sent: Saturday, October 03, 2009 11:52 AM
> Subject: [flex_india:25612] Flex Memory Consumption
>
>
>>
>> Hello All,
>>             How do i check Flex performance and memory management in
>> the flex code,please give me some resources or source code to better
>> understand.
>>
>>
>> Thank You.
>>
>>
>>
>>
>> Regards,
>> Amit Sisodiya
>>
>> >>
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" 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/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to