vector::push_back cause A heap has been corrupted at the exact address
<p>I have a simple code about managing resource by using vector.
But when i run to this line :</p>

<pre><code>sentClientList.push_back(socket);
</code></pre>

<p>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.
<a href="https://i.stack.imgur.com/0ffdZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ffdZ.png" alt="Here is the bug"></a>
<a href="https://i.stack.imgur.com/0B1gz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0B1gz.png" alt="enter image description here"></a></p>

<p>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.</p>

<p>So here are the questions:</p>

<ol>
<li>What way I can ruin the data in vector without touching it?</li>
<li>Is there anyway to automatically ignore this error?</li>
<li>Can I use try catch to catch this?</li>
</ol>