Template Delete

Started by
11 comments, last by SajberToffe 20 years, 5 months ago
actually pointer sizes can vary altough they can be at most sizeof(void *) * CHAR_BITS / 8 bytes.
Advertisement
quote:
...cause one can't get the size from delete(void * ptr)...

Actually you can, just declare you delete-operator as
void operator delete(void *p, std::size_t size) {}  

more people than you have found the need for size to be an argument of delete...

[edited by - amag on October 23, 2003 7:54:50 AM]
That''s true... maby it''s not much of a difference anyway... perhaps I''ll stick with operator delete...

But still, I don''t know someone answered my main question. If the whole memory block is freed when freeing from the node part.

This topic is closed to new replies.

Advertisement