XPCOMGC/Static Checker: Difference between revisions

Jump to navigation Jump to search
inferences
(shaverism!)
(inferences)
 
Line 49: Line 49:
  <td>
  <td>
  <td>No
  <td>No
<td>
  <td>May only appear on the GC heap
  <td>May only appear on the GC heap
<tr>
<tr>
Line 68: Line 69:
</table>
</table>


=== When are finalizers required? ===
=== Inferences ===


Any class with a destructor must be finalized unless it is annotated with <tt>NS_FINALIZER_NOT_REQUIRED</tt>
* Class restrictions are inferred from their bases and members
* Arrays and typedefs are inferred from their base type.
* Pointers to managed and GC types are considered managed types, *unless* they are declared with <tt>NS_UNMANAGED</tt>
* The destructor of all "managed" classes is inferred to be finalizer-safe. This includes NS_MANAGED, NS_GC_TYPE, and anything derived from MMgc::GCObject, MMgc::GCFinalizedObject, XPCOMGCObject, and XPCOMGCFinalizedObject
* Any class with a destructor must be finalized unless it is annotated with <tt>NS_FINALIZER_NOT_REQUIRED</tt>
Confirmed users, Bureaucrats and Sysops emeriti
1,217

edits

Navigation menu