On Wednesday, 17 September 2014 at 09:21:13 UTC, eles wrote:

But, OTOH, maybe it is a confusion in my head that comes from the fact that "constructing" an object means both allocating and constructing, while "destructing" means both deallocating and destructing.

It usually is. I'm not sure what you are talking about. Most containers in C++ (and D) first allocate with an allocator, and then placement construct.

I sometimes just feel that construction/destruction shall be separated form allocation/deallocation.

Again, it usually is. AFAIK, the only thing is "vanilla new", which conveniently does both for you in a single convenient call. If you want to do *anything* else, then you have to manage both individually.

Reply via email to