Re: obj function hello()



gert wrote:
rpbg...@xxxxxxxxx (Roland Pibinger) wrote:

Why malloc? Why a memory leak?

Can you collaborated on the memory leak part please ?
How would you do it ?

void leak(size_t howmuch) {
malloc(howmuch);
}

will do it nicely, provided you #include <stdlib.h>

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews


.



Relevant Pages

  • Memory leak in ADODB Connection15::Open method
    ... void CDBBase::CreateDBHandle ... Purify is showing a memory leak of 36 bytes in Connection15::Open method ... We are using MDAC version 2.81, Visual C++ .NET, Microsoft Development ...
    (microsoft.public.data.ado)
  • Re: Memory leak
    ... > void f ... There is no pointer pointing to it anymore, ... means you have no way of freeing it again: you created a memory leak. ... So the correct sequence in your example would be: ...
    (comp.lang.cpp)
  • Re: C++ is slow
    ... >> void main ... > If you use anything else besides 'int' return type ... > You have a memory leak. ... >> PROG II ...
    (comp.lang.cpp)
  • Re: ComboBox DeleteItem() not being called for all items?
    ... On 12 Dec, 01:58, Giovanni Dicanio ... No more "Memory leak detected".. ... I also had to remove void ... CLpCombo::DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct) since it ...
    (microsoft.public.vc.mfc)