# Purge unneeded objects **🟡 Intermediate · Lesson 39** Release objects you no longer need while their scope keeps working. This job buffer declares close as its disposal method, so Melder retains each many creation until explicit disposal. Pass an instance with purge_all=False to retire only that object. The default purge_all=True retires all retained objects for the selected binding in that scope. Purge returns the removed count, keeps the registration available, and lets later melds create fresh objects. A SpellSpace can purge its own objects without touching the conduit. Application-held Python references still point to the old objects: stop using their resources after disposal. ## Before you run Use the [Intermediate guide](../../intermediate/index.md) for prerequisite concepts. Run from a checkout with Melder installed and Python 3.14 free-threading selected. The collection download includes the level's local helper modules. ## Run the saved script ```bash python UX_and_AIX_experiences/02_intermediate/39_purge_unneeded_objects.py ``` ```powershell py -3.14t UX_and_AIX_experiences/02_intermediate/39_purge_unneeded_objects.py ``` {download}`Download this collection <../../downloads/intermediate-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/1211e838099a342c9dde48f064b1e772b6060e13/UX_and_AIX_experiences/02_intermediate/39_purge_unneeded_objects.py) ## Public surface md.Spellbook.bind, md.Existence.many, md.Conduit.meld, md.Conduit.purge, md.Conduit.enter_spellspace, md.SpellSpace.meld, md.SpellSpace.purge, md.Conduit.cleanup ## Code ```{literalinclude} ../../downloads/02_intermediate/39_purge_unneeded_objects.py :language: python :linenos: ``` ## Check the outcome The script contains its own assertions or demonstrated refusal paths. Run it to evaluate those checks against your installed version. The code above is taken directly from the saved file; no run output is invented here. [More intermediate examples](index.md) · [Level guide](../../intermediate/index.md) ## Related guides - [Spell spaces, lineage, and child scopes](../../intermediate/scopes.md) ## API contracts - [Spellbook](../../reference/api/binding/spellbook.md) - [Conduit](../../reference/api/resolution/conduit.md) - [SpellSpace](../../reference/api/resolution/spellspace.md) - [Existence](../../reference/api/resolution/existence.md)