Skip to content

Commit

Permalink
Corrections for implementation notes, adding note about ViewSynchroni…
Browse files Browse the repository at this point in the history
…zers, see #97
  • Loading branch information
jonathanolson committed Mar 18, 2023
1 parent 985a7ca commit c60b70a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/implementation-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Enumerations use EnumerationValue rather than string literal unions, by choice.

## Memory Management

The majority of the elements in the sim are statically allocated at startup, and exist for the lifetime of the sim, hence All uses of `link`, `addListener`, etc. do NOT need a corresponding `unlink` or `removeListener`.
The majority of the elements in the sim are statically allocated at startup, and exist for the lifetime of the sim, hence most uses of `link`, `addListener`, etc. do NOT need a corresponding `unlink` or `removeListener`. BodyViews and the vector Nodes are the main thing that are dynamically created and destroyed. They are created/destroyed with `ViewSynchronizer`s

The sim statically allocates all Body instances, and the spinner that adds or removes Body instances in fact toggles `isActiveProperty` values for each. This simplifies the implementation and will simplify PhET-iO instrumentation.

Expand Down

0 comments on commit c60b70a

Please sign in to comment.