Skip to content

Possible memory leak in Wire.cpp #2142

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxdutka opened this issue Oct 7, 2023 · 1 comment · Fixed by #2148
Closed

Possible memory leak in Wire.cpp #2142

maxdutka opened this issue Oct 7, 2023 · 1 comment · Fixed by #2148
Labels
enhancement New feature or request

Comments

@maxdutka
Copy link

maxdutka commented Oct 7, 2023

When upper layer library not call end() function before destroy TwoWire object, memory leak will occur because TwoWire class don't free txBuffer/rxBuffer on destroy.

@fpistm fpistm added the enhancement New feature or request label Oct 9, 2023
@fpistm
Copy link
Member

fpistm commented Oct 19, 2023

Hi @maxdutka
probably it can cause memory link anyway, it is always good to call end() before destroy.

fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Oct 19, 2023
add destructor to call end().
Fixex stm32duino#2142

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Oct 19, 2023
add destructor to call end().
Fixes stm32duino#2142

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit that referenced this issue Oct 19, 2023
add destructor to call end().
Fixes #2142

Signed-off-by: Frederic Pillon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

2 participants