Skip to content

Conversation

@ashalva
Copy link
Contributor

@ashalva ashalva commented Jan 29, 2024

Have been playing with Demo app and realised there is a memory leak in ToggleObservable. It is 100% reproducible if you try to override any Toggle value.

Instruments Memory Debugger

Fix is quite straightforward, adding weak self as ToggleObservable is a reference type. Also added the deinit where I remove every publisher stored in cancellables. Its an extra safety for any potential future memory leaks.

@albertodebortoli
Copy link
Member

Beautiful! Thank you so much 🤩

@albertodebortoli albertodebortoli merged commit e412046 into TogglesPlatform:main Jan 29, 2024
@ashalva ashalva deleted the bugfix/sa/fix-ToggleObservable-memory-leak branch January 29, 2024 16:09
@albertodebortoli albertodebortoli added this to the 0.11.0 milestone Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants