Platform Package reference: Function _NewObject()
Description of the function _NewObject() available in all Platform Packages for WebGL JavaScript 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.
Declaration
function _NewObject( aClass, aReserved )
Parameters
aClass
Data structure representing the class of the object to create.
aReserved
Should be null.
Discussion
The function _NewObject() implements the Chora new operator. _NewObject() allocates memory for a new instance of the specified class aClass and initializes the object properly. For example:
var device = EmWiApp._NewObject( EmWiApp.Application.DeviceClass, null );
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 garbage collection.