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
memory leak with SPI() or new SPI() #1923
Comments
Fixed with 426ac06 But actually just |
The memory bug looks fixed but software SPI is not working for me. Looks like
|
Oops - thanks! Should have tested that :) Just fixed properly :) |
It works, bug is fixed. And now even from https://stackoverflow.com/a/383503 it looks like without
And with the fix the |
as per forum topic http://forum.espruino.com/conversations/348343/#15490345
it looks like when creating software SPI or I2C or Serial there is a memory leak when deleting it
it is same with
s=SPI()
ors=new SPI()
while both do something slightly different, the leak is in both.I guess I don't fully understand difference between
var t=new Type()
vsvar t=Type()
, seems to often do same thing e.g.d=Date()
,d=new Date()
both creates date however with SPI() it seems differentAlso what is maybe related that there is
so with s=SPI() this method is called while
new SPI()
creates new instance of SPI object, pretty confusing :-)What is also strange and may be related to the leak is that after
var s=new SPI()
there are two objects in global named SPI as autocomplete shows and it can be deleted once. SeeThe text was updated successfully, but these errors were encountered: