Aric Cyr Aric.Cyr@gmail.com writes:
Ya, I thought about that after I sent my previous mail as well... an assert would probably be more useful for checking "This". I also disagree that "This" is guaranteed to always be non-NULL. There really is no way you can force policy how a user calls the function, so minimally checking (or aborting) on NULL is a sane thing to do. It doesn't hurt the code, and catches potential usage problems.
Not checking at all and crashing works just as well to catch problems, and doesn't hurt performance. There's no reason to add NULL checks unless there is a Windows app that depends on it.