In early versions of C++, the only way to control allocation of class of objects was by assigning to the 'this' parameter inside a constructor.
This practice is no longer allowed, because a better, safer, and more general technique is to define a member function operator new instead.
For example:
this = malloc(n);
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|