When can a memory leak occur?

前端 未结 8 2083
野性不改
野性不改 2021-02-08 06:52

I don\'t know what to think here...

We have a component that runs as a service. It runs perfectly well on my local machine, but on some other machine (on both machine RA

8条回答
  •  既然无缘
    2021-02-08 07:34

    bad_alloc doesn't necessarily mean there is not enough memory. The allocation functions might also fail because the heap is corrupted. You might have some buffer overrun or code writing into deleted memory, etc.

    You could also use Valgrind or one of its Windows replacements to find the leak/overrun.

提交回复
热议问题