struct entity {
int x;
};
.........
void* memory = GetMemoryFromMyCustomAllocator();
entity* Entity = (entity*) memory;
Entity->x = 1;
I want to avoid new, delete or placement new. I use c++ because I need the OOP features.
Is the above a valid way to do so? Instead of having a constructor I would just write a function InitializeEntity , same for destructor. Are there any downsides? Thank you.