Is reading a pointer to deleted memory undefined behavior?

Viewed 193

Consider

Foo* f = new Foo();
delete f;
Foo* g = f;

Is the final statement now undefined due to my reading a pointer to memory that I don't own? To me it violates the one-past-the-end rule, so it ought to be.

Note that

Foo* f;
Foo* g = f;

is undefined.

3 Answers
Related