Platform Package reference: Function EwLockObject()

Description of the function EwLockObject() available in all Platform Packages for 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.

Declaration

void EwLockObject( XObject aObject )

Parameters

aObject

Pointer to the object which should be protected from being discarded by the garbage collection.

Discussion

The function EwLockObject() adds the given object aObject to a global root set. Objects, which are stored in the root set will still keep alive together with other objects depending on them. Objects, which are not stored in the root set and not referenced by any other object stored in the root set are garbage and will be released during the next EwReclaimMemory() invocation.

Please note, the size of the root set is limited to 16 entries. This means, maximum 16 objects can be locked. To remove again a previously locked object from the root set use the function EwUnlockObject().