Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


This interface is a factory interface, which produces appropriate instances of nsIWeakReference. Weak references in this scheme can only be produced for objects that implement this interface.
Inherits from: nsISupports Last changed in Gecko 1.7

Method overview

nsIWeakReference GetWeakReference();



Produces an appropriate instance of nsIWeakReference.

nsIWeakReference GetWeakReference();


Return value

The resulting nsIWeakReference instance.


The XPCOM glue library provides nsSupportsWeakReference, a canonical implementation of nsISupportsWeakReference.

This interface was frozen for Gecko 0.9.9. See bug 48726 for details. From Gecko 2.0 interfaces are no longer frozen.

See also

Document Tags and Contributors

 Contributors to this page: erxin, Sheppy, gsvelto, trevorh, Nickolay, Ted_Mielczarek, Pmash
 Last updated by: erxin,