   detecting memory "bleeding"
  I have a really irritating problem.  In my game, I have a pointer to an object, but somewhere along the line, the pointer is getting modified and is no longer pointing to the correct location, making fatal exception errors.I've thoroughly checked the code and there are no times where the pointer is modified other than at creation and deletion, and it works fine for several minutes before getting screwed.  This means that somewhere, some other bit of code is writing to memory it shouldn't be.  So what I need is some way to monitor the pointer/variable in question to see when it gets modified.Is there anything (preferrably in VS6) that can do this?   
  Well, yes, it can be done, but I don't have VS6 handy so I can't check how exactly. x86 supports (I think it's 4) memory breakpoints, where you give it a memory address and it monitors that address for any changes. In gdb it's done using watch expr. You can also do it from within your program using Windows debugging functions, dig in MSDN to find out about that.   ;  What you need is a hardware breakpoint;  Thanks for the link Nitage - that seems like what I need.  I haven't found the culprit yet, but at least I think I'm on the right track now.   ;  Good luck finding the problem. Be sure to start making good use of assert()'s too, in order to prevent some types of bugs in future. In particular, use them to at least check preconditions, and that array accesses are within bounds.   