Erik,
thanks for clearing that up for me. In retrospect it makes sense that
the memory builds up with the trace statement. From now on I will test
for memory leak in the standalone player.
Jiri
EECOLOR wrote:
That all looks fine. There is no memory leak in the code you showed here.
You do not need to delete tTime as it is declared within the scope of the
function and will be marked for deletion as soon as the function is
complete.
If I run the classes (with the line clockdata = new
ClockData() commented out), the memory is stable in the stand alone
player. In flash the memory is slowly going up, but that is because we
are doing a trace each interval.
Note that it takes a few seconds for the memory to be stable.
Greetz Erik
On 2/18/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote:
Erik,
it would be something like this:
var c:Clock = new Clock();
getTime()
setInterval(this , 'getTime' , 1000)
function getTime()
{
var tTime:Time = c.getElepasedTime()
trace(tTime.serialize())
delete tTime; // is this neccessary and if so, is tTime = null
maybe
better ???
}
EECOLOR wrote:
Could you post the code that actualy calls these methods?
Greetz Erik
On 2/15/08, Jiri Heitlager <[EMAIL PROTECTED]> wrote:
Thanks for your reply Bob, it is for AS2. I read a lot of articles
about
it and understand the general concept. That is why I post the question.
If I understood correctly the posted code should not leave any objects
unreferenced and therefor cleared for deleting.
But the memory goes up anyway. I tested it with only this two classes
instantiated and nothing else.
I am hoping somebody can take a look at the code I posted and give me
the reassurence that I am doing things correctly.
Jiri
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders