Skip to content

[$500] [Due for payment 2025-12-03] react-native-performance memory leak patch on Android #72343

Description

@mateuuszzzzz

If you haven't already, check out our contributing guidelines and patch guidelines for information on how to manage patches.


Patch Information

Library Name: react-native-performance
Library Version: 5.1.4
Patch Number: 002
Patch Description: fix-listeners-memory-leak
Full Patch Filename: react-native-performance+5.1.4+002+fix-listeners-memory-leak.patch

Patch Details

Reason for Patch

This patch is part of memory leak audit.
react-native-performance has a memory leak where ReactMarker listeners are not properly removed when the module is destroyed. Additionally, setupListener can be called multiple times when getPackages is called multiple times, causing duplicate listeners.

Changes Made

This PR mainly improves how listeners are added and removed. It also extracts lambdas into constants so that they can be consistently referenced when calling addListener and removeListener, preventing duplicate listeners and ensuring that listeners can be properly removed.

Upstream Status

Upstream PR/Issue: oblador/react-native-performance#118

Related Information

PR Introducing Patch: #72341

Additional Notes

This fix isn’t specific to our HybridApp setup, these issues can occur in any bare React Native or brownfield app on Android.

Checklist

  • Patch file is correctly named and placed in the appropriate directory
  • Patch is documented in the corresponding details.md file
  • This issue is linked in the details.md file
  • Upstream PR/issue has been created (if applicable)
Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022001042913833799711
  • Upwork Job ID: 2001042913833799711
  • Last Price Increase: 2025-12-16

Activity

  1. changed the title [-]`react-native-performance` memory leak patch[/-] [+]`react-native-performance` memory leak patch on Android[/+] on Oct 10, 2025
  2. mateuuszzzzz commented on Oct 23, 2025

    @mateuuszzzzz
    ContributorAuthor

    Upstream PR has been merged. Let's wait for next release.

  3. mateuuszzzzz commented on Nov 13, 2025

    @mateuuszzzzz
    ContributorAuthor

    New version was released some time ago: https://github.com/oblador/react-native-performance/releases/tag/v6.0.0

    I'm gonna prepare a PR that will remove current patch.

  4. getusha commented on Nov 17, 2025

    @getusha
    Contributor

    Looks like this needs a C+ could you assigned a c+ and bz @mateuuszzzzz?

  5. aimane-chnaif commented on Nov 17, 2025

    @aimane-chnaif
    Contributor

    I am happy to review linked PR

  6. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 18, 2025
  7. melvin-bot commented on Nov 18, 2025

    @melvin-bot

    Triggered auto assignment to @VictoriaExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  8. 29 remaining items

  9. mountiny commented on Dec 16, 2025

    @mountiny
    Contributor

    I think $500 makes sense here

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 16, 2025
  11. changed the title [-][Due for payment 2025-12-03] `react-native-performance` memory leak patch on Android[/-] [+][$250] [Due for payment 2025-12-03] `react-native-performance` memory leak patch on Android[/+] on Dec 16, 2025
  12. melvin-bot commented on Dec 16, 2025

    @melvin-bot
  13. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 16, 2025
  14. melvin-bot commented on Dec 16, 2025

    @melvin-bot

    Current assignee @aimane-chnaif is eligible for the External assigner, not assigning anyone new.

  15. changed the title [-][$250] [Due for payment 2025-12-03] `react-native-performance` memory leak patch on Android[/-] [+][$500] [Due for payment 2025-12-03] `react-native-performance` memory leak patch on Android[/+] on Dec 16, 2025
  16. melvin-bot commented on Dec 16, 2025

    @melvin-bot

    Upwork job price has been updated to $500

  17. VictoriaExpensify commented on Dec 16, 2025

    @VictoriaExpensify
    Contributor

    Hey @aimane-chnaif - I've sent you an offer in Upwork. Let me know once you have accepted it and I'll organize payment

  18. VictoriaExpensify commented on Dec 19, 2025

    @VictoriaExpensify
    Contributor

    Payment summary:
    C: @mateuuszzzzz - contractor, not owed anything
    C+: @aimane-chnaif - paid $500 via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions