Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualjbadams

Posted 04 April 2013 - 05:33 AM

Why did i got downvoted for this?? The reason you give are a bit far fetch imo. First, for the code size, yea, you might lose 1-2 bytes each time you use it in you executable, big deal... calling delete [] might do the trick, but this alone won't protect you from trying to delete a null pointer, that's the point of the macros  , not the (x) = null (and save some source code lines too). Also, i don't see how setting a variable to null would make any difference in 99% of normal code usage... useless you spend you're entire time creating and deleting stuff, and even then...

: Restored post contents from history.


#4Vortez

Posted 04 April 2013 - 01:41 AM

ç


#3Vortez

Posted 04 April 2013 - 01:33 AM

Why did i got downvoted for this?? The reason you give are a bit far fetch imo. First, for the code size, yea, you might lose 1-2 bytes each time you use it in you executable, big deal... calling delete [] might do the trick, but this alone won't protect you from trying to delete a null pointer, that's the point of the macros  , not the (x) = null (and save some source code lines too). Also, i don't see how setting a variable to null would make any difference in 99% of normal code usage... useless you spend you're entire time creating and deleting stuff, and even then...


#2Vortez

Posted 03 April 2013 - 03:27 PM

Why did i got downvoted for this?? The reason you give are a bit far fetch imo. First, for the code size, yea, you might lose 1-2 bytes each time you use it in you executable, big deal... calling delete [] might do the trick, but this alone won't protect you from trying to delete a null pointer, that's the point of the macros  , not the (x) = null (and save some source code lines too). Also, i don't see how setting a variable to null would make any difference in 99% of normal code usage... useless you spend you're entire time creating and deleting stuff, and even then...


#1Vortez

Posted 03 April 2013 - 03:25 PM

Why did i got downvoted for this?? The reason you give are a bit far fetch imo. First, for the code size, yea, you might lose 1-2 bytes each time you use it in you executable, big deal... calling delete [] might do the trick, but this alone won't protect you from trying to delete a null pointer, that's the point of the macros, not the (x) = null. Also, i don't see how setting a variable to null would make any difference in 99% of normal code usage... useless you spend you're entire time creating and deleting stuff, and even then...


PARTNERS