Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Here's just one reason it's bad practice to set a pointer to
- // NULL when you've freed it unless you have a good, specific reason
- // to do so. There are *many* more.
- bool doFooStuff()
- {
- Foo* j = AllocFoo();
- if (j != NULL)
- {
- // do some stuff
- FreeFoo(&j);
- }
- // do some more stuff
- return (j != NULL)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement