When I realloc a buffer to be smaller, does it delete the data in the buffer until it reach the correct size?
<p>My question is a little confusing, but what I'm asking is what does <code>realloc</code> do with the left over data when it minimizes it buffer? For example, lets just say I had a buffer filled with 50-bytes (assuming my buffer can hold up to 50-bytes of data). Later on in my code I resize my buffer with <code>realloc</code> to now only hold up to 30-bytes. What does <code>realloc</code> do with the left over 20-bytes?</p>