1
0
Fork 0
wasp-os/wasp/apps
Daniel Thompson 2858826921 apps: Replace del self.x with self.x = None in all apps
Testing has demonstrated that del self.x does not make the memory used to
store x available for garbage collection.

There is clearly an additional reference from another place. In fact
*after* del self.x then the memory can be made available for GC by
assignment (e.g. self.x = None). However I haven't found how to release
this reference and there is nothing in self.__dict__ that can help.

For now we'll use a twp-step process where we set the variable to None
before deleting it.

This has a big impact on memory usage. For Software it is almost 1k
(a.k.a. about 10% impact on free RAM).

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-07-28 22:01:04 +01:00
..
alarm.py apps: Replace del self.x with self.x = None in all apps 2021-07-28 22:01:04 +01:00
calc.py simulator: test_qa: Add some basic docstring tests 2021-01-13 21:51:17 +00:00
chrono.py all clocks: Add a preview() method ready for a watch face chooser 2021-06-20 10:21:25 +01:00
clock.py all clocks: Add a preview() method ready for a watch face chooser 2021-06-20 10:21:25 +01:00
demo.py apps: DemoApp: Fully document the demo app 2021-06-20 10:43:25 +01:00
dual_clock.py all clocks: Add a preview() method ready for a watch face chooser 2021-06-20 10:21:25 +01:00
faces.py apps: Replace del self.x with self.x = None in all apps 2021-07-28 22:01:04 +01:00
fibonacci_clock.py all clocks: Add a preview() method ready for a watch face chooser 2021-06-20 10:21:25 +01:00
flashlight.py simulator: test_qa: Add some basic docstring tests 2021-01-13 21:51:17 +00:00
gameoflife.py drivers: st7789: Pre-allocate a memoryview 2021-01-17 17:44:21 +00:00
haiku.py simulator: test_qa: Add some basic docstring tests 2021-01-13 21:51:17 +00:00
heart.py apps: heart: Implement a debug mode to copy out raw data 2021-05-05 21:06:39 +01:00
hello.py docs: Introduce the Application Writer's Guide. 2020-05-11 21:44:30 +01:00
launcher.py simulator: test_qa: Add some basic docstring tests 2021-01-13 21:51:17 +00:00
musicplayer.py apps: music: Change SWIPE_LEFTRIGHT to SWIPE_UPDOWN. 2021-03-27 09:08:36 +00:00
pager.py widgets: ConfirmationView: Adopt the button widget 2021-01-10 10:34:37 +00:00
play2048.py Disallow swipes while confirmation prompt is displayed 2021-01-15 20:08:57 +00:00
settings.py apps: settings: Clamp the dates a little more tightly 2021-02-20 08:42:16 +00:00
snake.py simulator: test_qa: Add some basic docstring tests 2021-01-13 21:51:17 +00:00
software.py apps: Replace del self.x with self.x = None in all apps 2021-07-28 22:01:04 +01:00
sports.py apps: SportsApp: Initial sports app implementation 2021-06-20 17:24:10 +01:00
steps.py apps: steps: Reduce the graphing scale 2021-03-01 20:03:07 +00:00
stopwatch.py widgets: Refactor the stopwatch as a widget 2021-06-20 17:03:05 +01:00
template.py all clocks: Add a preview() method ready for a watch face chooser 2021-06-20 10:21:25 +01:00
testapp.py apps: testapp: Force characters to render with a not-black background 2021-03-29 22:17:27 +01:00
timer.py widgets: Clarity whether spinner max is inclusive or exclusive 2021-01-12 20:22:44 +00:00
weather.py Added weather application. 2021-06-03 21:43:38 +01:00
word_clock.py all clocks: Add a preview() method ready for a watch face chooser 2021-06-20 10:21:25 +01:00