Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
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
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Object deletion

Object deletion

2004-02-24       - By Tim Stickland

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Hi

I know this has been covered before but I just don 't get it :-/

I 'm trying to delete objects. As far as I understand things, all
references to objects must be destroyed before an object can be
successfully deleted. So that 's what I 've done. But it doesn 't work.

<script >

MyClass = function() {
   trace( "initialised ");   
};

MyClass.prototype.kill = function() {
   kill(this);
};

kill = function(obj) {
   trace(myInstance);   // [object Object]
   delete myInstance;
   trace(myInstance);   // undefined   
   trace(obj);         // [object Object]
   delete obj;
   trace(obj);         // [object Object] ????
};

myInstance = new MyClass();
myInstance.kill();

</script >

Can anyone explain to me why this doesn 't work?

Thanks
Tim


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
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:105063
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)