Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Wire memory leak#2442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 1 commit intostm32duino:mainfrombenmalenfant:Fix-Wire-memory-leak
Jul 16, 2024
Merged

Fix Wire memory leak#2442

fpistm merged 1 commit intostm32duino:mainfrombenmalenfant:Fix-Wire-memory-leak
Jul 16, 2024

Conversation

benmalenfant
Copy link
Contributor

@benmalenfantbenmalenfant commentedJul 16, 2024
edited
Loading

Summary

This PR fixes the memory leak bug caused by multiple Wire.begin() calls, mentioned in#2441

The strategy used here is to initialise the buffer variables on the Wire object initialisation instead of the begin.

Validation

Code formatting

  • Ensure AStyle check is passed thanks CI

Closing issues

Fixes#2441

Signed-off-by: Benoit Malenfant <25072667+benmalenfant@users.noreply.github.com>
@benmalenfantbenmalenfant marked this pull request as ready for reviewJuly 16, 2024 01:46
Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

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

LGTM
Moreover it makes sense to not init pointer and size atbegin() as thereset*Buffer are called after and do nothing if the pointer is null which was the case before this PR.

@fpistmfpistm added the enhancementNew feature or request labelJul 16, 2024
@fpistmfpistm added this to the2.8.1 milestoneJul 16, 2024
@fpistmfpistm merged commitbd7f61a intostm32duino:mainJul 16, 2024
23 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpistmfpistmfpistm approved these changes

Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
Milestone
2.8.1
Development

Successfully merging this pull request may close these issues.

Wire memory leak on multiple begin() call
2 participants
@benmalenfant@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp