Hi Mark,
> Instead of deleting the reference from the scriptInstanceList
> why not just
> set the scriptInstanceList to [] of course that assumes that
> there is only
> one object / behaviour attached to the sprite and that setting the
It's become a mostly theoretical discussion by now, but from the purely
object oriented point of view (yes, I'm one of THOSE freaks) that would be
interfering with the other objects in the scriptInstanceList.
Why should it matter? Say you have a sprite with two behaviors, and say that
both behaviors have a reference to an object. By letting one of them delete
both of them, you bypass the other behavior's cleanup routines and leave an
object in memory that has no way of removing itself anymore.
The thing is, if you KNOW that there are never going to be any other
behaviors attached to the sprite, then there's no practical problem, but if
you write behaviors for reuse, you can't know...
Just my own two cent OOP purism ;)
Karina
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]