From e813dab3940088bd0063c8eb602af012bafd2a38 Mon Sep 17 00:00:00 2001 From: Luisav1 Date: Thu, 14 Sep 2023 10:50:08 -0400 Subject: [PATCH] Add note on not needing to dispose much. See https://github.com/phetsims/build-a-nucleus/issues/177. --- doc/implementation-notes.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/implementation-notes.md b/doc/implementation-notes.md index 0d6e402..7b82a2f 100644 --- a/doc/implementation-notes.md +++ b/doc/implementation-notes.md @@ -60,7 +60,7 @@ The Chart Intro screen features a main nuclide chart, the `NuclideChartNode` whi ## General functioning -#### General particle lifespan +#### General particle lifespan and note on disposal - A particle is created from either the `NucleonCreatorNode` or from `createParticleFromStack()`. The created particle is added to the _particles_ array (unless it is a mini-atom particle). @@ -69,6 +69,12 @@ The Chart Intro screen features a main nuclide chart, the `NuclideChartNode` whi - A particle is removed using `returnParticleToStack()` and / or `animateAndRemoveParticle()`. - Each particle deals with its disposal of its ParticleView through a disposeEmitter called when the Particle is disposed, this is typically the last step after removal of the particle from all necessary arrays. + - `particles` is the main list of particles and once a Particle is removed from there, the Particle goes through the + disposal process above. + + +- Other than particles, everything else stays around for the lifetime of the sim and therefore doesn't need to be + unlinked or disposed. #### Important notes