Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
briar
briar
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 681
    • Issues 681
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 16
    • Merge Requests 16
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • briar
  • briarbriar
  • Issues
  • #780

Closed
Open
Opened Nov 24, 2016 by Ernir Erlingsson@ernirDeveloper
  • Report abuse
  • New issue
Report abuse New issue

Temporarily leaked Activities on orientation changes

While working on #725, I noticed something: we're leaking Activities temporarily.

We are using anonymous inner classes as callbacks for asynchronous tasks, during their execution it's possible that an orientation change occurs that destroys the old Activity/Fragment. The task stores a reference to the callback, and therefore implicitly to the Activity. This means that the initial Activity will be kept alive until the task finishes execution. Multiple orientation changes will might result in multiple Activities being temporarily leaked, although !415 (closed) relieves some of that by ensuring there is only one leaked Activity maximum.

Not sure what the best course of action here is, we could try to handle the orientation changes ourselves which re-uses the initial Activity but will require careful programming.

https://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChange

Edited Nov 21, 2020 by Cleopatra
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: briar/briar#780