pikasTech / PikaPython

An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. Similar project: MicroPython, JerryScript.
http://pikapython.com/
MIT License
1.47k stars 134 forks source link

isinstance函数进行的类型判断导致的内存问题 #345

Closed cyc36880 closed 1 month ago

cyc36880 commented 1 month ago
PixPin_2024-07-21_17-06-50

经过测试发现,只要类内 isinstance() 函数判断类型超过一次,就会一直申请内存,并且在脚本退出后,多申请的内存不会释放

pikasTech commented 1 month ago

https://github.com/pikasTech/PikaPython/commit/2bd5059eb067d93e8b71d4727afe509dac81dbe0