Skip to content

Try to fix memory leak in _readData. - #315

Merged
koral-- merged 2 commits into
DeviceFarmer:masterfrom
sunjw:fix-adb-pull-file-memory-leak
Mar 30, 2023
Merged

koral-- merged 2 commits into
DeviceFarmer:masterfrom
sunjw:fix-adb-pull-file-memory-leak

Conversation

@sunjw

@sunjw sunjw commented Jul 1, 2022

Copy link
Copy Markdown

"readNext" promise call chain causes all promises not be garbage collected until pull command finish. So if you pull a large file, it will take memory as the same size of the file.

@koral--

koral-- commented Jul 1, 2022

Copy link
Copy Markdown
Member

At a first glance, removing of the listener should be (also?) in finally. If it is not there the listener may not be removed in case of error and a leak may occur in this case.
Correct me if I'm wrong.

Moreover, sign-off is missing so DCO check fails.

@sunjw
sunjw force-pushed the fix-adb-pull-file-memory-leak branch from c264165 to b435b6d Compare July 4, 2022 05:44
@koral--

koral-- commented Jul 4, 2022

Copy link
Copy Markdown
Member

@pcrepieux @denis99999 could you take a look?

@koral--
koral-- merged commit b4b8235 into DeviceFarmer:master Mar 30, 2023
@sunjw
sunjw deleted the fix-adb-pull-file-memory-leak branch April 22, 2024 03:17
@sunjw sunjw mentioned this pull request Apr 27, 2025
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.

2 participants