mozilla

Revision 30893 of Components.utils.getWeakReference

  • Revision slug: Components.utils.getWeakReference
  • Revision title: Components.utils.getWeakReference
  • Revision id: 30893
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 4 words added, 4 words removed

Revision Content

{{ gecko_minversion_header("1.9") }}

This method was introduced in Firefox 3 and is used for obtaining a weak reference for an object.

To obtain the object reference, you have to call get() on the resulting object.

In addition, just because get succeeds doesn't mean your object is valid. It might simply not have been garbage collected. You might have to check other aspects of the object (like {{ domxref("Node.parentNode()") }} on a DOM node) to verify the object is truly what you want.

{{ languages( { "ja": "ja/Components.utils.getWeakReference" } ) }}

Revision Source

<p>{{ gecko_minversion_header("1.9") }}</p>
<p>This method was introduced in <a href="/en/Firefox_3_for_developers" title="en/Firefox_3_for_developers">Firefox 3</a> and is used for obtaining a weak reference for an object.</p>
<p>To obtain the object reference, you have to call <code>get()</code> on the resulting object.</p>
<p>In addition, just because get succeeds doesn't mean your object is valid. It might simply not have been garbage collected. You might have to check other aspects of the object (like {{ domxref("Node.parentNode()") }} on a DOM node) to verify the object is truly what you want.</p>
<p>{{ languages( { "ja": "ja/Components.utils.getWeakReference" } ) }}</p>
Revert to this revision