#11 zero unused pointers

closed-accepted
nobody
5
2002-05-21
2002-03-22
No

when deleting items, make sure that the pointers are
set to zero.

Discussion

  • Ben Jansens
    Ben Jansens
    2002-03-27

    Logged In: YES
    user_id=166767

    perhaps the easiest way to do this would be to use a macro
    DELETE or SAFE_DELETE. That way we could find any
    places that didnt 0 the pointer very easily. `grep delete`.

    I know macros are not thought of highly by shaleh, but
    perhaps this would be an exception for the better.

     
  • Logged In: YES
    user_id=37132

    As Ken points out in that thread, zeroing pointers helps with a certain type of error. We are not depending
    on the zeroed out value, just using the case as a chance for error checking.

    Thanks.

     
    • status: open --> closed-accepted
     
  • Logged In: YES
    user_id=37132

    we are faitly consistent here, though this will be ongoing.