Skip to content

[Android] modules memory leaks #23997

@listenzz

Description

@listenzz

🐛 Bug Report

Native modules memory leaks when reload bundle by double click "R".

To Reproduce

create react app

react-native init MyApp --template typescript 
# &
npm start

open the android project by AndroidStudio,Run app through 'Run' button

屏幕快照 2019-03-18 下午7 30 26

dump java heap with Profiler

屏幕快照 2019-03-18 下午7 21 36

double click "R"

force GC and dump java heap again

屏幕快照 2019-03-18 下午7 22 23

Now, we can see memory leaks.

not just built in modules, but also custom modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: AndroidAndroid applications.Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions