|
|
On 30/05/2013 10:46 PM, Francois Labreque wrote:
>>> A raw pointer is a basic type and thus will likewise not be implicitly
>>> initialized.
>>
>> So it points to random memory?
>
> Yes. C++ still allows you to shout yourself in the foot.
Oh, I wasn't disputing that. Just checking.
Today I discovered that some of the code I copy-pasted actually had some
memory allocation in it, and I hadn't explicitly deallocated it again.
To be clear... I only need to do explicit deallocation if I've done
explicit allocation in the first place, right?
unsigned char foo[512];
vs
unsigned char * foo = new[512];
Post a reply to this message
|
|