You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Frank Dahmen <fr...@dahmenia.de> on 2013/12/06 09:16:50 UTC
SkinnablePopupContainer.open() -> close() -> increases System.privateMemory
Hi,
see subject, i think I've cleaned up the popup
i also did a test with a clean (empty) SkinnablePopupContainer.
privateMemory goes up, not eyery time, so i think it can be
destroyed.... but only sometimes????
opened and closed 10 times:
System.privateMemory: 53784576
System.privateMemory: 54345728
System.privateMemory: 54910976
System.privateMemory: 55443456
System.privateMemory: 54837248
System.privateMemory: 55447552
System.privateMemory: 55934976
System.privateMemory: 56307712
System.privateMemory: 56418304
System.privateMemory: 56414208
or is System.privateMemory not the right value to look at?
thanks
Re: SkinnablePopupContainer.open() -> close() -> increases
System.privateMemory
Posted by Alex Harui <ah...@adobe.com>.
FlashPlayer GC is "opportunistic". It doesn't run as a background task.
It generally runs at the end of some frames and before it has to allocate
new pages of memory.
Also, FP memory is supposedly never condensed when fragmented so a simple
test of opening and closing a dialog several times may still result in
memory statistics going up just because of fragmentation. You have to run
1000's of repetitions of a particular code path to see if memory
statistics reach a steady state before you know for sure you have a leak.
-Alex
On 12/6/13 12:51 AM, "Frank Dahmen" <fr...@dahmenia.de> wrote:
>Thanks,
>
>seems to work when i call gc() on close
>
>but i read that one shouldn't do that and as i understand it shouldn't
>be necessary
>
>because if it can be destroyed it will be destroyed
>
>but in fact calling it keeps memory down, not calling it increases memory
>
>
>
>
>Am 06.12.2013 09:35, schrieb Thiago Maia:
>> Hello Frank
>>
>> I usually do in this way to dont increase the memory
>>
>> PopUpManager.removePopUp(this);
>> flash.system.System.gc();
>>
>> regards
>>
>> Thiago Maia
>> a00s@a00s.com
>> On 12/6/2013 12:16 AM, Frank Dahmen wrote:
>>> Hi,
>>>
>>> see subject, i think I've cleaned up the popup
>>> i also did a test with a clean (empty) SkinnablePopupContainer.
>>>
>>> privateMemory goes up, not eyery time, so i think it can be
>>> destroyed.... but only sometimes????
>>>
>>> opened and closed 10 times:
>>>
>>> System.privateMemory: 53784576
>>> System.privateMemory: 54345728
>>> System.privateMemory: 54910976
>>> System.privateMemory: 55443456
>>> System.privateMemory: 54837248
>>> System.privateMemory: 55447552
>>> System.privateMemory: 55934976
>>> System.privateMemory: 56307712
>>> System.privateMemory: 56418304
>>> System.privateMemory: 56414208
>>>
>>>
>>> or is System.privateMemory not the right value to look at?
>>>
>>> thanks
>>>
>>>
>>>
>>
>>
>> ---
>> This email is free from viruses and malware because avast! Antivirus
>> protection is active.
>> http://www.avast.com
>>
>
Re: SkinnablePopupContainer.open() -> close() -> increases System.privateMemory
Posted by Frank Dahmen <fr...@dahmenia.de>.
ok, thanks
I still got scout not working on phone (problem with flashdevelop)
but for now i can say if gc() works, the component has no memory leak,
right?
Am 06.12.2013 10:36, schrieb Justin Mclean:
> Hi,
>
>> seems to work when i call gc() on close
> You're assuming that memory is garbage collected frequently rather then when required and that may not be the case. You're better off using the Flash Profiler or Scout to check for memory leaks. There should be no need to call gc() in production code unless you know the user doesn't mind a delay at that point in time.
>
> Thanks,
> Justin
Re: SkinnablePopupContainer.open() -> close() -> increases
System.privateMemory
Posted by Alex Harui <ah...@adobe.com>.
Also, System.gc() doesn't work on production Flash Players.
On 12/6/13 1:36 AM, "Justin Mclean" <ju...@classsoftware.com> wrote:
>Hi,
>
>> seems to work when i call gc() on close
>
>You're assuming that memory is garbage collected frequently rather then
>when required and that may not be the case. You're better off using the
>Flash Profiler or Scout to check for memory leaks. There should be no
>need to call gc() in production code unless you know the user doesn't
>mind a delay at that point in time.
>
>Thanks,
>Justin
Re: SkinnablePopupContainer.open() -> close() -> increases System.privateMemory
Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,
> seems to work when i call gc() on close
You're assuming that memory is garbage collected frequently rather then when required and that may not be the case. You're better off using the Flash Profiler or Scout to check for memory leaks. There should be no need to call gc() in production code unless you know the user doesn't mind a delay at that point in time.
Thanks,
Justin
Re: SkinnablePopupContainer.open() -> close() -> increases System.privateMemory
Posted by Frank Dahmen <fr...@dahmenia.de>.
Thanks,
seems to work when i call gc() on close
but i read that one shouldn't do that and as i understand it shouldn't
be necessary
because if it can be destroyed it will be destroyed
but in fact calling it keeps memory down, not calling it increases memory
Am 06.12.2013 09:35, schrieb Thiago Maia:
> Hello Frank
>
> I usually do in this way to dont increase the memory
>
> PopUpManager.removePopUp(this);
> flash.system.System.gc();
>
> regards
>
> Thiago Maia
> a00s@a00s.com
> On 12/6/2013 12:16 AM, Frank Dahmen wrote:
>> Hi,
>>
>> see subject, i think I've cleaned up the popup
>> i also did a test with a clean (empty) SkinnablePopupContainer.
>>
>> privateMemory goes up, not eyery time, so i think it can be
>> destroyed.... but only sometimes????
>>
>> opened and closed 10 times:
>>
>> System.privateMemory: 53784576
>> System.privateMemory: 54345728
>> System.privateMemory: 54910976
>> System.privateMemory: 55443456
>> System.privateMemory: 54837248
>> System.privateMemory: 55447552
>> System.privateMemory: 55934976
>> System.privateMemory: 56307712
>> System.privateMemory: 56418304
>> System.privateMemory: 56414208
>>
>>
>> or is System.privateMemory not the right value to look at?
>>
>> thanks
>>
>>
>>
>
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
Re: SkinnablePopupContainer.open() -> close() -> increases System.privateMemory
Posted by Thiago Maia <a0...@a00s.com>.
Hello Frank
I usually do in this way to dont increase the memory
PopUpManager.removePopUp(this);
flash.system.System.gc();
regards
Thiago Maia
a00s@a00s.com
On 12/6/2013 12:16 AM, Frank Dahmen wrote:
> Hi,
>
> see subject, i think I've cleaned up the popup
> i also did a test with a clean (empty) SkinnablePopupContainer.
>
> privateMemory goes up, not eyery time, so i think it can be
> destroyed.... but only sometimes????
>
> opened and closed 10 times:
>
> System.privateMemory: 53784576
> System.privateMemory: 54345728
> System.privateMemory: 54910976
> System.privateMemory: 55443456
> System.privateMemory: 54837248
> System.privateMemory: 55447552
> System.privateMemory: 55934976
> System.privateMemory: 56307712
> System.privateMemory: 56418304
> System.privateMemory: 56414208
>
>
> or is System.privateMemory not the right value to look at?
>
> thanks
>
>
>
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com