2 ms·
The best answer is 'Yes'. But in practical terms, I suppose it depends on whether you need that pointer to be NOT-NULL. If you're never ever going to use that
by simonblack 6y ago
The best answer is 'Yes'.
But in practical terms, I suppose it depends on whether you need that pointer to be NOT-NULL. If you're never ever going to use that pointer, you probably will get away with it.
But it's also a bit like 'If you never lie, you don't need a good memory'. If you always test for NULL, it's never going to blow up in your face when you least expect it.