【在 c***2 的大作中提到】 : stack: double free? (it's supposed to be managed by OS) : heap: normal use, you always need to free it since it's allocated by you.
G*L
8 楼
据谁说的?
据说美洲用visa更方便,欧洲用mc更多,中国用银联 ~~~~~~~~~~~~~~~~~~~~
【在 G*******s 的大作中提到】 : 据说美洲用visa更方便,欧洲用mc更多,中国用银联
f*y
9 楼
the heap one is easy. if you free an obj on stack, when the stack pop its content, it will de-reference a piece of memory that stack no longer owns ( an dangling pointer), so the result is undefined.