pulkin / micropython

MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
https://micropython.org
MIT License
103 stars 30 forks source link

Timeout for sms_list and fixed memory leak #75

Open bokolob opened 3 years ago

pulkin commented 3 years ago

I do not quite understand what kind of memory leak you refer to. sms_list_buffer is inside the garbage-collected mpy heap so no need to delete it. Besides, what happens if you call SMS.list twice in a row? The script won't be happy if you delete the first list it is using preventively.

bokolob commented 3 years ago

If you call list twice then pointer will be rewritten, but memory not freed. I suppose that gc cannot control pointers inside C code.

bokolob commented 3 years ago

As I understand list isn’t used if pointer is not null. And I didn’t change this logic. Could you explain your point please ?

bokolob commented 3 years ago

Hello! Can we return to disscussing this issue?