The way it way described to me is, as long as you maintain one reference
to the object, it will be retained.  The object is only destroyed when
all references to it are destroyed.

x = new Button();

mybuttons[7] = x;

to truly destroy the button object:

delete x;
mybuttons[7] = null; // or however you'd like to do it

so this approach would still maintain 2 references, i.e. the buttons
still "go into an array" as you said.

If you only want one reference, but still keep the buttons out of the
array list, you could just store the string reference:

x = new Button();

mybuttons[7] = x.toString(); // now the array holds the string
reference, not an object reference

then, to grab a reference from the list:

button ref = eval(mybuttons[7]);

I don't know which approach is less resource-intensive.

-- 
scott andrew lepera
-----------------------------------
web stuff:     www.scottandrew.com
music stuff:   www.walkingbirds.com

_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help

Reply via email to