M
Mike
I am trying to utilize Monitor::Enter() and Monitor::Exit() to guard a
critical section. The critical section just happens to be buried deep
in a client hierarchy. I am using it in this manner:
Monitor::Enter(this);
//...
Monitor::Exit(this);
I am thinking "what better way to guard against un wanted accesses
than to use the this pointer and guard itself". I am finding something
peculiar, however. The this pointer is unitialized and a NULL
exception is being thrown!
The only thinkg I can figure is somehow the child class this pointer
hasn't been initialized yet while the parent class this pointer has?!
Any other thoughts on how C++ managed classes operate?
critical section. The critical section just happens to be buried deep
in a client hierarchy. I am using it in this manner:
Monitor::Enter(this);
//...
Monitor::Exit(this);
I am thinking "what better way to guard against un wanted accesses
than to use the this pointer and guard itself". I am finding something
peculiar, however. The this pointer is unitialized and a NULL
exception is being thrown!
The only thinkg I can figure is somehow the child class this pointer
hasn't been initialized yet while the parent class this pointer has?!
Any other thoughts on how C++ managed classes operate?