Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

Created Unassigned: VLD does not differentiate between new, new[] and malloc [10582]

$
0
0
I've looked at the source, and VLD does not differentiate between new, new[] or mallloc, or for that matter, when an incorrect de-allocation occurs, such as memory being allocated with new but deleted with free.

It's also possible to mix new[] and free, or malloc with delete without any warning or memory leak being detected.

This would require a change to VLD to store the allocation type, ie. new, new[] or malloc, and then on de-allocation, you could throw a warning if a mismatched de-allocation occurs.

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>