Print

Print


Not particularly relevant to the original question, but...

David LaFrance-Linden writes:
 > Here, it is clear what happens if A were go get retargeted (the
 > previous contents continue to get updated) or nullified (undefined,
 > because of usage of pointers into nullified data).

I presume that you mean deallocated instead of nullified.
They are not at all the same thing; in fact the phrase
"nullified data" doesn't make much sense.

Nullification is much more like retargetting than like
deallocation.  It does not touch the data - just the pointer.
In fact, you can even do nullification by using a pointer assignment
statement.

Perhaps you just misstated it accidentally.  But I'm posting the
correction because I have talked to people who mistakenly thought
that nullification was equivalent to deallocation.

--
Richard Maine                |  Good judgment comes from experience;
[log in to unmask]       |  experience comes from bad judgment.
                             |        -- Mark Twain