Platform Package reference: Function EwNewObject()
Description of the function EwNewObject() available in all Platform Packages for ANSI C compatible target systems. This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.
object‑of‑class 'aClassName' EwNewObject( aClassName, XHandle aReserved )
Reserved parameter. Should be 0 (zero).
The function EwNewObject() implements the Chora new operator. EwNewObject() allocates memory for a new instance of the specified class name aClassName and initializes the object properly. For example, to create an instance of the class Example::Application, following code can be used:
ExampleApplication object = EwNewObject( ExampleApplication, 0 );
The created object will remain in memory as long as the object is in use. Objects, which are not in use anymore are automatically released during the next EwReclaimMemory() invocation.