Philip Lawatsch
2003-07-08 16:02:29 UTC
Hi,
I have some questions about whats written in
http://www.parashift.com/c++-faq-lite/dtors.html#faq-11.14
(Describing some memory pool)
#1 From what i understand this will also work for new x[] and delete
[]x, or did i misunderstand something ?
and,
#2 At the time of destruction i do know from which pool my object came,
and thus i'd like to avoid using a global delete operator.
The example says that I could simply call the destructor and then my
pool's dealloc method.
But, what do I have to do if I do not have one single object, but an
array of objects ?
Call each objects destructor and then a dealloc for the whole array ?
Isn't there a way to simply call some delete[] (mypool) my_array ?
with kind regards philip
I have some questions about whats written in
http://www.parashift.com/c++-faq-lite/dtors.html#faq-11.14
(Describing some memory pool)
#1 From what i understand this will also work for new x[] and delete
[]x, or did i misunderstand something ?
and,
#2 At the time of destruction i do know from which pool my object came,
and thus i'd like to avoid using a global delete operator.
The example says that I could simply call the destructor and then my
pool's dealloc method.
But, what do I have to do if I do not have one single object, but an
array of objects ?
Call each objects destructor and then a dealloc for the whole array ?
Isn't there a way to simply call some delete[] (mypool) my_array ?
with kind regards philip