Search found 1348 matches

by deshipu
Wed Jun 20, 2018 7:17 pm
Forum: ESP32 boards
Topic: Odroid Go
Replies: 0
Views: 490

Odroid Go

There is a new ESP32 device, this time made by Odroid, and it's a handheld game console, but much bigger than the Pocket Sprite: https://wiki.odroid.com/odroid_go/odroid_go It looks like the version of my "stage" game library that I ported for M5Stack should work on this without any modifications (b...
by deshipu
Fri Jun 15, 2018 11:24 am
Forum: Development of MicroPython
Topic: Finaliser/__del__
Replies: 10
Views: 1327

Re: Finaliser/__del__

What would be situations in which it is not called ? It's implementation-dependent. In CPython 2.x it wouldn't get called if the object is a part of a cycle of references, for example — because it's then impossible to guess the correct order of destroying such objects, as the __del__ methods in the...
by deshipu
Fri Jun 15, 2018 11:01 am
Forum: General Discussion and Questions
Topic: How to free memory after unused imports?
Replies: 8
Views: 1032

Re: How to free memory after unused imports?

The more complex it is, the bigger a chance that you will have some reference to one of its variables or classes left somewhere. Especially when the module runs code on import, and not only defines some variables and classes.

Also, strings literals and variable names are interned and never released.
by deshipu
Thu Jun 14, 2018 5:54 pm
Forum: Development of MicroPython
Topic: Finaliser/__del__
Replies: 10
Views: 1327

Re: Finaliser/__del__

Note that __del__ is not guaranteed to be called, and when it's being called, it's not guaranteed that all the functions and variables you take for grated will still be available in memory.

If you need to call some code at the end of a scope, it's much better to use a context manager.
by deshipu
Thu Jun 14, 2018 5:36 pm
Forum: General Discussion and Questions
Topic: How to free memory after unused imports?
Replies: 8
Views: 1032

Re: How to free memory after unused imports?

It's an object as anything else, and it gets released as soon as there are no more references to it. When you only import a module, and don't do anything else with it, like in this example, there are only two places that have references to it (assuming the module itself doesn't do any monkeypatching...
by deshipu
Thu Jun 14, 2018 11:12 am
Forum: General Discussion and Questions
Topic: How to free memory after unused imports?
Replies: 8
Views: 1032

Re: How to free memory after unused imports?

It's still kept in sys.modules, you have to delete it from there.
by deshipu
Tue May 29, 2018 12:01 pm
Forum: General Discussion and Questions
Topic: PyConAu Talk - any suggestions?
Replies: 24
Views: 2627

Re: PyConAu Talk - any suggestions?

Great forum post. I was dismayed that PyCon at Portland appeared to have nothing covering Micropython this year... Well, there was a development board running it in the swag bag, a birds-of-feather meeting, and quite some coding done during the sprints. I wouldn't call that "nothing". Oh dear! Apol...
by deshipu
Mon May 28, 2018 3:06 pm
Forum: General Discussion and Questions
Topic: PyConAu Talk - any suggestions?
Replies: 24
Views: 2627

Re: PyConAu Talk - any suggestions?

Personally I would love to see a presentation talking about the techniques and best practices that could be used to write library (sensor driver) code that would be compatible with all the released versions and ports of MicroPython out there, without having to add a new library every time someone de...
by deshipu
Mon May 28, 2018 2:57 pm
Forum: General Discussion and Questions
Topic: PyConAu Talk - any suggestions?
Replies: 24
Views: 2627

Re: PyConAu Talk - any suggestions?

philwilkinson40 wrote:
Mon May 28, 2018 8:12 am
Great forum post. I was dismayed that PyCon at Portland appeared to have nothing covering Micropython this year...
Well, there was a development board running it in the swag bag, a birds-of-feather meeting, and quite some coding done during the sprints. I wouldn't call that "nothing".