Skip to content
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

De-allocate memory used by timers on removal #2936

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Jan 13, 2025

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the Migration Guide.
  • My changes are in accordance to the esp-rs API guidelines

Extra:

Pull Request Details 📖

Description

Hopefully fixes #2892

Turned out the memory taken by a timer wasn't de-allocated. (I plan to rewrite timer handling sooner or later, but this should fix it for now)

Testing

Before especially on disconnection / re-connection there was a steady decrease in free memory so you can modify one of the examples accordingly

@bjoernQ bjoernQ changed the title De-alocate memory used by timers on removal De-allocate memory used by timers on removal Jan 13, 2025
@bjoernQ bjoernQ marked this pull request as ready for review January 13, 2025 07:57
Copy link
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

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

Honestly I'm very sad reading code like this, but if it works, it works.

@bjoernQ
Copy link
Contributor Author

bjoernQ commented Jan 13, 2025

Honestly I'm very sad reading code like this, but if it works, it works.

That whole file makes me sad - I really need to rewrite all of that

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

Thanks!

@JurajSadel JurajSadel added this pull request to the merge queue Jan 13, 2025
Merged via the queue into esp-rs:main with commit 7d7ce27 Jan 13, 2025
31 of 38 checks passed
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.

esp_wifi eventually uses up all available memory and stops working
3 participants