RemoveLinks question

BlitzMax Forums/BlitzMax Beginners Area/RemoveLinks question

Ant(Posted 2006) [#1]
Hi, I have a piece of code which creates 3 links to 3 successive objects in a list:


Using the Link.value() method, I compare variables of each object pointed to by the link.

If these variables are identical I use removelink to delete the objects from the list.

However, I assumed that when the object the link points to is deleted, then the link should automatically become NULL (as the object it points to no longer exists). However, in the debugger the pointer retains the address it was pointing to even after the removelink command has executed. Is this normal?
Thanks


FlameDuck(Posted 2006) [#2]
Is this normal?
Yes.


Ant(Posted 2006) [#3]
;-)

But why arent the pointers null?


Dreamora(Posted 2006) [#4]
if you use the remove method, it automatically connects the previous and next link to guarantee the lists structure. As long as this was not the last item, then reference of the next item won't be null


Ant(Posted 2006) [#5]
I understand, thanks for the explanation