nank1ro / solidart

Signals in Dart and Flutter, inspired by SolidJS
https://docs.page/nank1ro/solidart
MIT License
155 stars 5 forks source link

feat: automatic dispose #76

Closed nank1ro closed 9 months ago

nank1ro commented 9 months ago

Implements the automatic disposal in the reactive system. Now all the reactive system auto disposes by default when there aren't subscribers attached. closes https://github.com/nank1ro/solidart/issues/71

codecov[bot] commented 9 months ago

Codecov Report

Merging #76 (a86e2ff) into main (5cd35e9) will not change coverage. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/nank1ro/solidart/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=HvJYtaixiW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti)](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti) ```diff @@ Coverage Diff @@ ## main #76 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 20 20 Lines 1178 1227 +49 ========================================= + Hits 1178 1227 +49 ``` | [Files](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti) | Coverage Δ | | |---|---|---| | [...flutter\_solidart/lib/src/models/solid\_element.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvZmx1dHRlcl9zb2xpZGFydC9saWIvc3JjL21vZGVscy9zb2xpZF9lbGVtZW50LmRhcnQ=) | `100.00% <100.00%> (ø)` | | | [...ackages/flutter\_solidart/lib/src/widgets/show.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvZmx1dHRlcl9zb2xpZGFydC9saWIvc3JjL3dpZGdldHMvc2hvdy5kYXJ0) | `100.00% <100.00%> (ø)` | | | [packages/solidart/lib/src/core/atom.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL2F0b20uZGFydA==) | `100.00% <ø> (ø)` | | | [...ckages/solidart/lib/src/core/collections/list.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL2NvbGxlY3Rpb25zL2xpc3QuZGFydA==) | `100.00% <100.00%> (ø)` | | | [...ackages/solidart/lib/src/core/collections/map.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL2NvbGxlY3Rpb25zL21hcC5kYXJ0) | `100.00% <100.00%> (ø)` | | | [...ackages/solidart/lib/src/core/collections/set.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL2NvbGxlY3Rpb25zL3NldC5kYXJ0) | `100.00% <100.00%> (ø)` | | | [packages/solidart/lib/src/core/computed.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL2NvbXB1dGVkLmRhcnQ=) | `100.00% <100.00%> (ø)` | | | [packages/solidart/lib/src/core/effect.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL2VmZmVjdC5kYXJ0) | `100.00% <100.00%> (ø)` | | | [...ckages/solidart/lib/src/core/reactive\_context.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL3JlYWN0aXZlX2NvbnRleHQuZGFydA==) | `100.00% <100.00%> (ø)` | | | [packages/solidart/lib/src/core/read\_signal.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvc29saWRhcnQvbGliL3NyYy9jb3JlL3JlYWRfc2lnbmFsLmRhcnQ=) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://app.codecov.io/gh/nank1ro/solidart/pull/76?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti) | |