- armor-tracks-children? armorprocedure
- armor-tracks-children-set! armor enabledsetter
- set! (armor-tracks-children? armor) enabledsetter
Armor instances can optionally perform bookkeeping to keep track of their children (see armor-parent) so that the children can be nullified when the armor instance is freed or nullified. This helps protect against use-after-free bugs. See "When should an armor be a child of another armor?" in the Getting Started guide for more information.
armor-tracks-children? returns #t if armor performs bookkeeping to track its children, or #f if it does not. You can use armor-tracks-children-set! to enable or disable this behavior for armor. If you disable bookkeeping when armor already has children, it will forget about those children.
You can pass the children: keyword argument to define-armor-type to enable or disable bookkeeping by default for all instances of that armor type. Disabling bookkeeping can improve performance for armors that will have many children, but you must be careful not to use the children after armor has been freed. If armor will never have children, there is no reason to disable bookkeeping.