
Posted:
Apr 28, 2004 @ 4:01pm
by mlepage
There is a syntax called "placement new" which will allow you to construct an object into existing, preallocated memory. I'm not sure if it is supported in eVC3 or eVC4, but if it is, that's another way to do what you want, without writing your own new operator.
Don't do arcane casting tricks. They are dangerous and there are other, proper ways to do what you want.

Posted:
Apr 28, 2004 @ 4:48pm
by Kzinti
Implementing operator new (and delete) inside his classes is the best (and cleaness) way to do it. Placement new would be the hack to stay away from.