XPCOMGC/Static Checker: Difference between revisions

finalizers required... separate section
(storage classes)
(finalizers required... separate section)
Line 26: Line 26:
  <th>Global
  <th>Global
  <th>Destructor is Finalizer-safe
  <th>Destructor is Finalizer-safe
<th>Requires Finalizer
  <th>Notes
  <th>Notes
<tr>
<tr>
Line 34: Line 33:
  <td>No
  <td>No
  <td>No
  <td>No
<td>
  <td>
  <td>
  <td>must only be on the stack
  <td>must only be on the stack
Line 44: Line 42:
  <td>No
  <td>No
  <td>Yes
  <td>Yes
<td>
  <td>Requires rooting
  <td>Requires rooting
<tr>
<tr>
Line 52: Line 49:
  <td>
  <td>
  <td>No
  <td>No
  <td>Yes
  <td>May only appear on the GC heap
<td>
<tr>
<tr>
  <th>NS_NOGC_TYPE
  <th>NS_NOGC_TYPE
Line 59: Line 55:
  <td>
  <td>
  <td>No
  <td>No
<td>
  <td>
  <td>
  <td>
  <td>
Line 70: Line 65:
  <td>
  <td>
  <td>Yes
  <td>Yes
<td>
  <td>May be GC-allocated.
  <td>May be GC-allocated. Does not require finalizer
<tr>
<th>NS_GCFINALIZED_OK
<td>
<td>
<td>
<td>
<td>Yes
<td>Yes
<td>May be GC-allocated. Requires a finalizer. example: nsString
</table>
</table>
=== When are finalizers required? ===
Any class with a destructor must be finalized unless it is annotated with NS_FINALIZER_NOT_NEEDED</tt>
Confirmed users, Bureaucrats and Sysops emeriti
1,217

edits