Dr. Memory seems like a great tool. Thanks for sharing.
Dr. Memory is also for Windows, unlike the other popular memory debugging tools.
It doesn't have to be wedged into the executable is another nice feature.
fixed, it just rewrote the code
Gi'e everyone a Christmas present and post your revised code, please. :)
Don't edit your original post, that makes all the commentary on it look to be wrong. You should post your revised code in a new, follow-up post in the thread.