Fusion icon indicating copy to clipboard operation
Fusion copied to clipboard

Explicit destruction changes, part 1 (critical, blocking)

Open dphfox opened this issue 3 years ago • 0 comments

Not finished yet. Will eventually implement the following:

  • [x] Removal of SemiWeakRef, onDestroy, isAccessible
  • [x] Changed SpecialKey:apply and applyInstanceProps to use Instance instead of SemiWeakRef
  • [x] The above changes imply that instances returned from New no longer have implicit garbage collection semantics. As such, removed the unit tests for inhibiting garbage collection.
  • [x] A needsDestruction utility method, which returns true if a given value needs an associated destructor. Currently only true for instances.
  • [ ] Adding destructors to Value and Computed, which are called when an old value is dropped from these objects.
  • [x] Warnings when Value, Computed, ForKeys, ForValues or ForPairs receives a value which needsDestruction but no destructor is provided. The default destructors provided by ForKeys, ForValues and ForPairs are considered deprecated, and will print these warnings, but will still function for the time being.
  • [ ] New unit tests for these features

dphfox avatar Aug 30 '22 14:08 dphfox