yes, because the argument was passed in as value,
所有跟贴·加跟贴·新语丝读书论坛
送交者: steven 于 2009-07-29, 18:30:39:
回答: lovecreatesbeauty says the problem is memory leak because Free() is not used! 由 BerkeleyWolf 于 2009-07-29, 17:56:49:
the value of pointer, the assignment took no effect, and hence the reference to the allocated memory was lost after the function returned. That's a memory leak. Of course, even functionally, this was wrong since after executing this code, there was no way to access that Stack.
所有跟贴:
加跟贴