Re: [RESOLVED] Memory leak?
Well, if you are still interested in original code analysis: you did not get that warning because compiler got confused by your returning whatever ultoa() returns. Obviously, the compiler doesn’t know that ultoa() returns the same pointer you pass to it.
However, when I compiled your function (with VS 2008) I did get a warning:
warning C4715: 'GetVolumeID' : not all control paths return a value
If you didn’t see it – it means that your warning level compiler switch is NOT set to 4 (/W4) as it should.
Re: [RESOLVED] Memory leak?
Quote:
Originally Posted by
Cpp_Noob
that is sooo true Paul McKenzie , most of my codes are "low level" and my eyes do glaze when looking over at STL code.
STL becomes a lot easier and more appealing once you take the time to play around with it a bit.