Skip to content

DictionaryAdapter Hanging References #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

brysem
Copy link

@brysem brysem commented Apr 12, 2021

DictionaryAdapter is leaking memory when objects are deallocated.

This PR serves to clean up some hanging references. In my test case this reduced the total leaks caused by DictionaryAdapter by 36%.

Reduces total dictionary related memory leaks by 36%
@cla-bot
Copy link

cla-bot bot commented Apr 12, 2021

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla.
CLA has not been signed by users: @brysem.
After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

@brysem
Copy link
Author

brysem commented Apr 12, 2021

@cla-bot check

@cla-bot cla-bot bot added the cla: yes label Apr 12, 2021
@cla-bot
Copy link

cla-bot bot commented Apr 12, 2021

The cla-bot has been summoned, and re-checked this pull request!

@rigor789 rigor789 merged commit f32093b into NativeScript:fix/memory-leaks Apr 13, 2021
NathanWalker pushed a commit that referenced this pull request Jul 3, 2021
* fix: don't allocate persistent empty objects

* fix: Blocks memory leak (#100)

* feat: drop custom WeakRef implementation & use built-in

* fix: free allocated memory in ReferenceWrapper

* fix: DictionaryAdapter Hanging References (#114)

* Clean up hanging references before deallocating

Reduces total dictionary related memory leaks by 36%

* fix

* chore: more leak fixes

* fix: only release enumerator_ when set (#117)

* fix: handle methods with pointer type params

fixes #109

* fix: referenceWrapper memory leak & CString leak

* refactor: ReferenceWrapper dispose to be managed internally

* fix: pre-allocate memory even for empty values

* fix: undo invalid fix (needs a different way)

Co-authored-by: Darin Dimitrov <darin.dimitrov@gmail.com>
Co-authored-by: Bryse Meijer <brysem@users.noreply.github.com>
Co-authored-by: logikgate <nick.fredricks@flypaper.com>
@brysem brysem deleted the fix/memory-leaks-dictionary branch January 3, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants