Hello all,
I recently was reading some code and i found something along the lines of this:
void GetText() {
int* size = new int;
// .......
// lots of code here
// .......
size = new int;
// crap here
}
^^ as you can see size is 'new'ed twice without being deleted. My question is, does this cause a memory leak? or does the first memory allocated get replaced by the second 'new'.
Thanks in advance :)