Memory leak tool tells me zero leaks but memory footprint keeps rising

前端 未结 6 1401
悲哀的现实
悲哀的现实 2021-01-23 06:42

I\'m running through some memory profiling for my application in SDK 3.2 and I used the \'Leak\' profiler to find all my memory leaks and I plugged all of them up. This is a sc

6条回答
  •  温柔的废话
    2021-01-23 07:00

    You can have a continuously growing program without necessarily leaking memory. Suppose you read words from the input and store them in dynamically allocated blocks of memory in a linked list. As you read more words, the list keeps growing, but all the memory is still reachable via the list, so there is no memory leak.

提交回复
热议问题