Towards an understanding of memory leak patterns: an empirical study in Python

SOFTWARE QUALITY JOURNAL(2023)

引用 0|浏览10
暂无评分
摘要
Memory leaks, an important and difficult issue in software development, occur when an object is inadvertently retained longer than necessary. Programming languages provide a variety of dynamic memory management methods to support programmers in preventing the introduction of defects that cause memory leaks. However, it is not yet possible to completely free programmers from the work of memory management. Indeed, runtime leak detection is time consuming and usually done after the fact, while manual code inspection requires rich developer experience. Understanding the common patterns of memory leaks can help developers be mindful of leaks or avoid them at an earlier stage during the development process and may further inspire future research. Eight code patterns are found in our case study specifically for memory leaks caused by circular references in Python. The observed patterns can explain 91.64% of the memory leaks in the studied projects. Our work can guide important decisions about the possibility of identifying memory leaks with static code analysis.
更多
查看译文
关键词
Memory leak,Circular reference,Code pattern
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要