Top "Placement-new" questions

In C++ placement new is used to construct an object at a particular memory location or to pass additional arguments to an allocation function.

What uses are there for "placement new"?

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would …

c++ memory-management new-operator placement-new
What is an in-place constructor in C++?

Possible Duplicate: C++'s “placement new” What is an in-place constructor in C++? e.g. Datatype *x = new(y) Datatype();

c++ constructor placement-new in-place
C++, is it possible to call a constructor directly, without new?

Can I call constructor explicitly, without using new, if I already have a memory for object? class Object1{ char *str; …

c++ constructor placement-new
Using new (this) to reuse constructors

This came up recently in a class for which I am a teaching assistant. We were teaching the students how …

c++ this placement-new
assignment of class with const member

Consider the following code: struct s { const int id; s(int _id): id(_id) {} }; // ... vector<s> v; v.…

c++ vector constants assignment-operator placement-new
Placement new and non-default constructors

Can I call the C++ placement new on constructors with parameters? I am implementing a custom allocator and want to …

c++ new-operator placement-new
How to properly free the memory allocated by placement new?

I've been reading somewere that when you use placement new then you have to call the destructor manually. Consider the …

c++ placement-new