|
XPSEDAPI
|
The object is the top-level object, from which anything which needs to get passed between modules should inherit. More...

Public Member Functions | |
| void | add_ref () |
| Called to indicate that some code is keeping an owning reference to the object. | |
| oneway void | release_ref () |
| Removes a reference to an object which was created by some other means (e.g. | |
| IObject | query_interface (in utf8string id) |
| Returns an IObject of the same implementation, which supports a specific interface. | |
Public Attributes | |
| readonly attribute string | objid |
| Fetches the ID of the object. | |
The object is the top-level object, from which anything which needs to get passed between modules should inherit.
| void XPCOM::IObject::add_ref | ( | ) |
Called to indicate that some code is keeping an owning reference to the object.
That code must call release_ref() later when it has finished with the object, or a memory leak may result. The object should be preserved in memory. Care should be taken to ensure that a cycle of objects waiting for each other to call release_ref is not created.
| IObject XPCOM::IObject::query_interface | ( | in utf8string | id | ) |
Returns an IObject of the same implementation, which supports a specific interface.
| id | The name of the interface, with each part of the scope separated by double colons. For example, "XPCOM::IObject". |
| oneway void XPCOM::IObject::release_ref | ( | ) |
Removes a reference to an object which was created by some other means (e.g.
by return from a function, out parameters, or add_ref). The object may destroy itself any time after no references remain.
| readonly attribute string XPCOM::IObject::objid |
Fetches the ID of the object.
IDs should be generated in a way which makes the probability of a collision negligible. The recommended method is to use a random number generated seeded with a sufficient amount of data, and output data in this form %08X-%04X-%04X-%04X-%04X%08X (where %0nX represents a hex string of n digits padded to the left with zeros if needed). The id must never change once set.