|
-
May 8th, 2012, 11:32 AM
#1
Questions about New and Delete
Hi
im afraid to create leaks while using heap, I have few questions,
how does delete [] knows how many memory was allocated in th 1st place.
Is it stored somewhere in the memory layout?
my confusion is about char* arrays since if i try to write with memcpy to &BmpFormatBuff instead of &BmpFormatBuff[0] it would write some binary data plus the string which lead me to think it stores the lenght somehwere in the memory layout.
what is going on there is a doub that cranks me up since some time ago.
thx in advance for your time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|