Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Re: [Flashcoders] this.onEnterFrame=undefined or delete
   this.onEnterFrame

Re: [Flashcoders] this.onEnterFrame=undefined or delete
   this.onEnterFrame

2004-03-14       - By FODOR

 Back
Reply:     1     2  

The only difference I see is -beside the speed- the same difference between
1000 mcs/vars/or anything set to undefined and the "absence" of reference to
these objects.

(15/03/04 2:39) Keith Peters wrote:

> I still think there is no difference.
> As far as I know, undefined is undefined is undefined.
> Can anyone demonstrate any difference between a variable that doesn't
> exist, one that has been deleted, and one that has been assigned
> undefined?
>
> y = 10;
> delete y;
> z = undefined;
> trace(x);
> trace(y);
> trace(z);
> trace(typeof x);
> trace(typeof y);
> trace(typeof z);
>
> Undefined is not a string or number or other type. It is the type
> undefined, which has one possible value: undefined.
> Something that is undefined == something else that is undefined. Just as
> 1 always equals 1, whether it's 1, 0+1, or 2-1, undefined will always
> equal undefined no matter how it becomes undefined.
>
> -- --Original Message-- --
> From: Morten Barklund [mailto:morten.barklund@(protected)]
> Sent: Sunday, March 14, 2004 8:25 AM
> To: flashcoders@(protected)
> Subject: RE: [Flashcoders] this.onEnterFrame=undefined or delete
> this.onEnterFrame
>
>
>> Because setting to undefinied, it still gets resources... ?
>
> That depends on the event model.
>
> If it for all movieclips checks if the onEnterFrame property has type
> function before calling it, then it will use the same amount of
> resources, as a check directly on the movieclip resolving to undefined
> is as fast as a check on the movieclip moving up the
> inheritance/prototype chain, to see if it exists here before figuring
> out, it resolves to undefined.
>
> Actually, I remember some other time this discussion was up, some
> believed that these steps up the prototype chain in stead of resolving
> it directly on the object would consume a few extra resources and thus
> setting to undefined was faster. But I've always deleted - I think it is
> a matter of preference...
>
> // Morten Barklund
> // DKMMUG Manager
>
>
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Supported by Fig Leaf Software
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Be sure to check the archives and the wiki:
> http://chattyfig.figleaf.com/
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106872
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> To unsubscribe send a blank e-mail to:
> Normal Mode: flashcoders-unsubscribe@(protected)
> Digest Mode: flashcoders-digest-unsubscrive@(protected)
>
>
>
>
>
>
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Supported by Fig Leaf Software
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Be sure to check the archives and the wiki:
> http://chattyfig.figleaf.com/
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106875
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> To unsubscribe send a blank e-mail to:
> Normal Mode: flashcoders-unsubscribe@(protected)
> Digest Mode: flashcoders-digest-unsubscrive@(protected)
>

-- ---- ---- ---- ---- ---- ---- ---- ----
Pascal FODOR

-- ---- ---- ---- ---- ---- ---- ---- ----
fodor@(protected) // flash@(protected)

******************************************
Visit: http://fodor.liane.net

Flash AV Players can be seen at:
http://fodor.liane.net/flash_AV_players/
******************************************














=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106878
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)