Skip to content
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

Remove Runtime shutdown hook when SDK instance is stopped #1956

Conversation

0xnm
Copy link
Member

@0xnm 0xnm commented Apr 2, 2024

What does this PR do?

Otherwise it is possible to have a memory leak when SDK instance is stopped, because reference to the SDK instance still exists through the hook runnable.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm 0xnm requested review from a team as code owners April 2, 2024 08:42
@codecov-commenter
Copy link

Codecov Report

Merging #1956 (fac1b96) into develop (0f0d085) will decrease coverage by 0.05%.
The diff coverage is 55.56%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1956      +/-   ##
===========================================
- Coverage    83.21%   83.16%   -0.05%     
===========================================
  Files          483      483              
  Lines        17584    17566      -18     
  Branches      2605     2603       -2     
===========================================
- Hits         14632    14608      -24     
+ Misses        2257     2254       -3     
- Partials       695      704       +9     
Files Coverage Δ
...ain/kotlin/com/datadog/android/core/DatadogCore.kt 81.25% <55.56%> (-2.60%) ⬇️

... and 30 files with indirect coverage changes

@0xnm 0xnm merged commit f05de15 into develop Apr 2, 2024
23 checks passed
@0xnm 0xnm deleted the nogorodnikov/remove-runtime-shutdown-hook-when-stopping-sdk-instance branch April 2, 2024 13:24
@xgouchet xgouchet added this to the 2.8.x milestone Apr 5, 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.

4 participants