[Microbit-Python] How does GC work in micro:bit MicroPython?

Larry Hastings larry at hastings.org
Mon Oct 12 11:11:44 CEST 2015


On 10/12/2015 02:06 AM, Damien George wrote:
> I didn't turn on finalisers because from experience they are rarely
> needed.  But they are not expensive to turn on so we can if needed.
>
> __del__ goes in the dict_table.
>
> I think we should fix this properly instead of monkey patching here
> and there.  Properly means combining the 2 heaps (uPy GC and C++).
> This would also give more RAM overall because then there's not a hard,
> fixed barrier between the 2 heaps which is currently 9.5k and 2k.

When you say "we should fix this properly", I suspect you mostly mean 
you.  I don't know if I can be of much help.

What should I do for now?  Just not worry about it?  I expect few people 
will create more than one scheduler, one button minder, and at most 
three accelerometer scalers, and these objects will live for the 
duration of the program.


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/mailman/private/microbit/attachments/20151012/289cf294/attachment-0001.html>


More information about the Microbit mailing list