Delete an object from a vector
问题 Step 1. Create an instance of a class Step 2. Push this instance to a vector Step 3. Call delete this; in a member method of an instance Step 4. Everything is Ok Step 5. Push something to the vector and get this *** glibc detected *** ./app: double free or corruption (fasttop): 0x0000000001017930 *** ======= Backtrace: ========= /lib/libc.so.6(+0x71bd6)[0x7f607d60cbd6] /lib/libc.so.6(cfree+0x6c)[0x7f607d61194c] ./app[0x40231c] ./app[0x402290] ./app[0x4053c0] ./app[0x4048fe] ./app[0x404246] .