Talk:RDF:Delegates: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
The delegate object presents two XPCOM objects, the first (inner) object exposes the interfaces nsISupports and nsIInterfaceRequestor to the corresponding RDF resource object. The GetInterface method on the inner XPCOM object returns a distinct nsISupports implementation (outer) on the delegate object (and calls QueryInterface on it). This may forward the reference counting to the RDF resource object to the resource object alive as long as there are external references to outer. The Release implementation on outer *does not delete* the delegate object under any circumstances, this is the sole responsibility of Release implementation on the inner nsISupports interface, which will be called upon deletion of the resurce object. | ; Dual ownership : The delegate object presents two XPCOM objects, the first (inner) object exposes the interfaces nsISupports and nsIInterfaceRequestor to the corresponding RDF resource object. The GetInterface method on the inner XPCOM object returns a distinct nsISupports implementation (outer) on the delegate object (and calls QueryInterface on it). This may forward the reference counting to the RDF resource object to the resource object alive as long as there are external references to outer. The Release implementation on outer *does not delete* the delegate object under any circumstances, this is the sole responsibility of Release implementation on the inner nsISupports interface, which will be called upon deletion of the resurce object. | ||
Revision as of 14:21, 21 April 2005
- Dual ownership
- The delegate object presents two XPCOM objects, the first (inner) object exposes the interfaces nsISupports and nsIInterfaceRequestor to the corresponding RDF resource object. The GetInterface method on the inner XPCOM object returns a distinct nsISupports implementation (outer) on the delegate object (and calls QueryInterface on it). This may forward the reference counting to the RDF resource object to the resource object alive as long as there are external references to outer. The Release implementation on outer *does not delete* the delegate object under any circumstances, this is the sole responsibility of Release implementation on the inner nsISupports interface, which will be called upon deletion of the resurce object.