The life cycle of Java components |
Contents |
||
Introduction |
||
Introduction |
||
In Java, objects live as long as they are reachable by a thread. In UNO, objects have a reference count and live as long as the reference count is greater than zero. When using pure Java UNO, the normal Java life cycle mechanism applies. When using Java UNO in cooperation with e.g. binary UNO, objects live as long as their reference count is not zero. In the following the life cycle of Java and C++ objects are described. |
||
C++ object mapped to Java |
||
If a C++ object is mapped to Java, it lives as long as it is reachable from a Java thread. That is to say that the life cycle of a C++ object mapped to Java corresponds to the Java life cycle mechanism as normal. An Object is created to cope with a certain work. In Java, once an object has completed its work, it is garbage-collected and its resources are recycled for use by other objects. Now, such an object is unreachable from a Java thread.
|
||
Java object mapped to C++ |
||
If a Java object is mapped to C++, the Java object lives as long as there is a C++ reference. That is to say that the life cycle of a Java object mapped to C++ corresponds to the C++ life cycle mechanism as normal. You can find further information to the life cycle of objects on the
following page: |
||
|
||
|
||
Author: Bertram
Nolte, Kay Ramme
(Mon 18 Jun 2001 11:54:14) |
||
|