由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Re: godly C++ programmers needed
相关主题
why do we still use dynamic allocation?请教关于allocator member function 的问题
从一个Embedded C++ quiz 调查看印度人的实力在子函数内开内存,返回主函数指针然后释放空间是不是很糟糕的(转载)
effective C++里的memory pool 一问:关于C/C++里的Static variable的memory allocation/initializa
关于内存泄漏什么是OS Memory management and heap structure?
C++一个string的小问题问个问题 (转载)
C++ Interview Question问个简单的memory allocation 的问题。
内存分配问题如何在fortran中定义一个动态的数组?
a small question about c++ memory allocationWhat is the difference between operator new and the new
相关话题的讨论汇总
话题: c++话题: also话题: delete话题: godly
进入Programming版参与讨论
1 (共1页)
k******r
发帖数: 2300
1
I am trying to answer your questions even though I don't consider a new job at
this time. Also as I mentioned, I am not a C++ expert.
1. delete this is commit suicide. There is many things should be aware.
Probably I can't cover all of them.
first of all, "this" object is not allocated memory by new[] or placement new.
secondly, member function of this can't call any members of "this".
Also, be sure never use "this" after you delete "this".
2. When delete a pointer through base class pointer, de
1 (共1页)
进入Programming版参与讨论
相关主题
What is the difference between operator new and the newC++一个string的小问题
如何在VC++下把raw图像快速写到硬盘里呢?C++ Interview Question
VC++ 中的 memory leak problem内存分配问题
C++ Error Questionsa small question about c++ memory allocation
why do we still use dynamic allocation?请教关于allocator member function 的问题
从一个Embedded C++ quiz 调查看印度人的实力在子函数内开内存,返回主函数指针然后释放空间是不是很糟糕的(转载)
effective C++里的memory pool 一问:关于C/C++里的Static variable的memory allocation/initializa
关于内存泄漏什么是OS Memory management and heap structure?
相关话题的讨论汇总
话题: c++话题: also话题: delete话题: godly