Skip to content

MOBILE-506: Fix memory leak - #769

Merged
enotniy merged 2 commits into
developfrom
feature/MOBILE-506
Sep 18, 2026
Merged

enotniy merged 2 commits into
developfrom
feature/MOBILE-506

Conversation

@enotniy

@enotniy enotniy commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is small, targeted, and reduces the risk of retaining an Activity reference without altering functional behavior.

Pull request overview

This PR addresses a potential memory leak in the SDK lifecycle callbacks by avoiding capturing an Activity instance inside a coroutine launched from onActivityStarted.

Changes:

  • Extract activity.applicationContext into a local appContext and pass that into updateAppInfo(...) from the coroutine to prevent retaining the Activity.
File summaries
File Description
sdk/src/main/java/cloud/mindbox/mobile_sdk/Mindbox.kt Avoids capturing Activity in a coroutine by using applicationContext when updating app info.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@enotniy
enotniy merged commit af399af into develop Sep 18, 2026
7 checks passed
@enotniy
enotniy deleted the feature/MOBILE-506 branch September 18, 2026 06:40
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.

3 participants