#include <boost/scoped_ptr.hpp>
int foo()
{
boost::scoped_ptr<int> p(new int);
}
int bar()
{
int * p = new int;
delete p;
}
int main()
{
}
/* objdump
08048540 <_Z3foov>:
_Z3foov():
8048540: 55 push %ebp
8048541: 89 e5 mov %esp,%ebp
8048543: 83 ec 18 sub $0x18,%esp
8048546: c7 04 24 04 00 00 00 movl $0x4,(%esp)
804854d: e8 ba fe ff ff call 804840c <_Znwj@plt>
8048552: 89 04 24 mov %eax,(%esp)
8048555: e8 92 fe ff ff call 80483ec <_ZdlPv@plt>
804855a: c9 leave
804855b: c3 ret
804855c: 90 nop
804855d: 90 nop
804855e: 90 nop
804855f: 90 nop
08048520 <_Z3barv>:
_Z3barv():
8048520: 55 push %ebp
8048521: 89 e5 mov %esp,%ebp
8048523: 83 ec 18 sub $0x18,%esp
8048526: c7 04 24 04 00 00 00 movl $0x4,(%esp)
804852d: e8 da fe ff ff call 804840c <_Znwj@plt>
8048532: 89 04 24 mov %eax,(%esp)
8048535: e8 b2 fe ff ff call 80483ec <_ZdlPv@plt>
804853a: c9 leave
804853b: c3 ret
804853c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*/