|
|
|
|
|
by 1718627440
262 days ago
|
|
I think where you are talking past each other is, that one is talking about temporal after and the other about causal after. The null check can be eliminated if the dereference happens temporally after, but causally before: if (ptr == NULL)
{
...
}
...
int foo = ptr->some_field;
|
|
But this brings us back to the article: Why does the author say that there's no way to check for NULL in the free function? Maybe they are hinting at something completely unrelated to what we're saying here?
If that's where we failed to communicate, then that makes sense. Thanks, stranger!