| jaded7 (41) | |
|
If, for example, I have the below snippet int *pInt = new int[5]; Is there a way of testing whether the memory at or above pInt[5] is free, or in use? | |
|
|
|
| Athar (4383) | |
| Not really. More importantly, why do you think you need to know? | |
|
|
|
| Moschops (5961) | |
| If new throws an exception, it couldn't give you the memory you asked for. If it doesn't, the memory was free and has now been allocated for your use. | |
|
Last edited on
|
|