Hello John,

Sorry for the late reply, I wanted to run
some tests before answering back.

I'm aware of the way the garbage collector works
(even though I'm a little confused with object parameters
stored in the inline functions inside Delegates, if they
get garbage collected after all or not).

Throughout my framework and the custom code for the game
I pay much attention to deleting all object references.

I've used xray in the past sometimes. I did this now too
but I'm having some troubles.

The only lines in my .fla are
import ....Application
Application.main(_root);

Where in xray should I be looking for object instances?
I can see all movieclips if I take a snapshot of _level0
but if I want to see the instances of the Tile objects,
or the TileManager, or the Countdown objects where
should I look? I tried _global.com.zefxis which is where
all the packages reside but all I see is functions (Classes)
and no objects.

e.g.

_global.com.zefxis.solarwind snapshot gives me:

animation (object)
  Animation (function)
  Animations (function)
  EaseFunctions (function)
  RelativeMovement (function)
  Sequence (function)

Any clues?

Thank you!
Dimitrios


----- Original Message ----- From: "John Grden" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, December 15, 2005 5:35 PM
Subject: Re: [FlashCoders] game slowing down - eventListener


Hey Dimitrios, I know this might be covering something you already
understand, but thought to say it outloud just in case.  An object lives as
long as there is reference to it in memory.

So, in this scenario below "obj" lives on even though I've tried to delete
the original reference to it ("tt" is Xray's trace method):

var obj:Object = new Object();
obj.prop = "here";
var a = obj;
var b = a;
tt("all: obj/a/b", obj, a, b);

delete obj;
tt("delete obj: obj/a/b", obj, a, b);

delete a;
tt("delete a: obj/a/b", obj, a, b);

delete b;
tt("delete b: obj/a/b", obj, a, b);
//++++++++++++++++++++++++

Which traces  out

//++++++++++++++++++++++++
(41) all: obj/a/b:
 prop = here


 prop = here


 prop = here


(41) delete obj: obj/a/b: undefined ::
 prop = here


 prop = here


(41) delete a: obj/a/b: undefined :: undefined ::
 prop = here


(42) delete b: obj/a/b: undefined :: undefined :: undefined

With a tile based game and all the possible references you're probably
running, you might have to take a closer look at how objects are being
destroyed for garbage collection.  You can easily see if they're still alive
using xray as well as delete them at runtime using the execute panel with
xray to see if that helps your memory issues a performance.  Also, try
changing the visibility of your movieclips at runtime with Xray or movie
items off stage one at a time at runtime to see who's hoggin' the CPU etc.

Check out the video on the Property Inspector for xray for working with
objects/movieclips at runtime:
http://labs.blitzagency.com/wp-content/xray/videos/tutorials/indexFlash.html#Overview.propertyInspectorOverview



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to