How does delete[] “know” the size of the operand array?

When you allocate memory on the heap, your allocator will keep track of how much memory you have allocated. This is usually stored in a “head” segment just before the memory that you get allocated. That way when it’s time to free the memory, the de-allocator knows exactly how much memory to free.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)