I have a simple code about managing resource by using vector. But when i run to this line :
sentClientList.push_back(socket);
It randomly break with this exeption throw : A heap has been corrupted (parameters: 0x76F9D8D0). What i noticed here is the address is triggered always the same for every time.
I try to debug but it occurred when ever it wants and just one every time I run the program. But when i press continue, the first value in vector become normal, it just ignores the bug and runs probably.
So here are the questions:
- What way I can ruin the data in vector without touching it?
- Is there anyway to automatically ignore this error?
- Can I use try catch to catch this?