Original question:
Why is the this pointer 0 in a VS c++ release build?
When breaking in a Visual Studio 2008 SP1 release build with the /Zi
It isn't the this pointer that is NULL, but rather the pointer you are using to call a member function:
this
class A { public: void f() {} }; int main() { A* a = NULL; a->f(); // DO'H! NULL pointer access ... // FIX A* a = new A; a->f(); // Aha! }