| View previous topic :: View next topic |
| Author |
Message |
digiman
Joined: 24 Sep 2006 Posts: 1
|
Posted: Sun Sep 24, 2006 11:38 am Post subject: Creating object inherited from DynamicObject |
|
|
How should I create objects of my class inherited from DynamicObject class?
| Code: |
Body *lBody = new Body();
|
or
| Code: |
Body *lBody = (Body *)Body::CreateNew();
|
_________________ Krasnoyarsk, Russian Fed. |
|
| Back to top |
|
 |
luke Site Admin
Joined: 15 Oct 2004 Posts: 621
|
Posted: Mon Sep 25, 2006 10:48 am Post subject: |
|
|
You should be able to do this however you like. TrueAxis just uses CreateNew to avoid conficts with any users or other libraries that override new and delete.
DynamicObjectCar uses the following code.
| Code: | DynamicObjectCar* TAC_CALL DynamicObjectCar::CreateNew()
{
DynamicObjectCar* pNew;
TA_MEMORY_MGR_NEW(pNew, DynamicObjectCar);
return pNew;
} |
|
|
| Back to top |
|
 |
|