Arrays, Stacks and Objects (oh my!)

lets say I have an array of object instances [Foo] the is filled in a manner similar to this

var temp = myObject(parameters)

then elsewhere I create a stack (yeah I know its just another array)… but this is a FILO message queue to process selected objects in order


Now FOO has pointers to all the active instances of “myObject” and myStack has a pointer to instance #3 (ok #4 as it is zero based)

here is the question, and I think I know the answer, just want to be sure


a) does it set myStack[0] to NIL?
b) or does the instance live on due to ARC???

if “b” then would I have to do this instead


there is a timer that looks at mystack and an processes the top entry. But if it has been removed from foo, then I need that entry to be nil so I can skip it

Haven’t tested but I think ‘b’ is the way to go and it requires being set to NIL.