-
Notifications
You must be signed in to change notification settings - Fork 38
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
Free the bitmap when set to empty string #168
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the latest release, setting the text to an empty string, then back to a string of the same size as the previous value, the bitmap label would not be updated. [See this code for example](https://github.com/adafruit/Adafruit_CircuitPython_MacroPad/blob/main/examples/macropad_grid_layout.py). In addition, clearing the memory when the text is empty seems to me to match expectations. (Also use `text` instead of `self._text`).
dhalbert
approved these changes
Apr 2, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This makes sense to me. Assuming you tested. Making a release immediately.
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Apr 2, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_ATECC to 1.2.10 from 1.2.9: > Reformatted per new black version > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP280 to 3.2.12 from 3.2.11: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Post-patch cleanup > Merge pull request adafruit/Adafruit_CircuitPython_BMP280#35 from tekktrik/readme-patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP3XX to 1.3.10 from 1.3.9: > Reformatted per new black version > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_DPS310 to 2.1.2 from 2.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_DPS310#22 from caternuson/iss21 > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_DS1841 to 1.0.8 from 1.0.7: > Reformatted per new black version > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_LC709203F to 2.2.2 from 2.2.1: > "Reformatted per new black version" > Update Black to latest. > Removed extra space > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.1.13 from 1.1.12: > Reformatted per new black version > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_LTR390 to 1.1.5 from 1.1.4: > Reformatted per new black version > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX7219 to 1.5.2 from 1.5.1: > Reformatted per new black version > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP2515 to 1.0.12 from 1.0.11: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP4728 to 1.2.3 from 1.2.2: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90640 to 1.2.7 from 1.2.6: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 2.1.11 from 2.1.10: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MPU6050 to 1.1.11 from 1.1.10: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_MS8607 to 1.0.10 from 1.0.9: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8591 to 1.0.7 from 1.0.6: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_RA8875 to 3.1.10 from 3.1.9: > Update Black to latest. > Merge pull request adafruit/Adafruit_CircuitPython_RA8875#29 from Neradoc/fix-documentation > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_TC74 to 1.0.7 from 1.0.6: > Merge pull request adafruit/Adafruit_CircuitPython_TC74#6 from Neradoc/fix-documentation > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_TMP006 to 2.1.9 from 2.1.8: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_TSL2561 to 3.3.9 from 3.3.8: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_VC0706 to 4.3.1 from 4.3.0: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_AVRprog to 1.4.4 from 1.4.3: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_BoardTest to 1.2.10 from 1.2.9: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.22.3 from 2.22.2: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#168 from Neradoc/patch-1 > Update Black to latest. Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Notification to 0.9.8 from 0.9.7: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 1.15.5 from 1.15.4: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README Updating https://github.com/adafruit/Adafruit_CircuitPython_RTTTL to 2.4.12 from 2.4.11: > "Reformatted per new black version" > Update Black to latest. > Fixed readthedocs build > Consolidate Documentation sections of README
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the latest release, setting the text to an empty string, then back to a string of the same size as the previous (non-empty) value, the bitmap label would not be updated, remaining invisible until its size changed. See this code for example. This is because
self._bitmap
was still set, with the right size, so wasself._tilegrid
, soself._local_group
remained empty.(Also one use of
self._text
instead oftext
fixed).