int main()
{
MyClass c( 12.0f );
std::printf("Hello\n");
}Looks like this in x86 asm:
00CE1260 push ebp 00CE1261 mov ebp,esp 00CE1263 sub esp,44h 00CE1266 push ebx 00CE1267 push esi 00CE1268 push edi 00CE1269 push ecx 00CE126A fld dword ptr [__real@41400000 (0CE4838h)] 00CE1270 fstp dword ptr [esp] 00CE1273 lea ecx,[c] 00CE1276 call MyClass::MyClass (0CE10C3h) 00CE127B push offset string "Hello\n" (0CE4830h) 00CE1280 call dword ptr [__imp__printf (0CE7238h)] 00CE1286 add esp,4 00CE1289 lea ecx,[c] 00CE128C call MyClass::~MyClass (0CE100Fh) 00CE1291 xor eax,eax 00CE1293 pop edi 00CE1294 pop esi 00CE1295 pop ebx 00CE1296 mov esp,ebp 00CE1298 pop ebp 00CE1299 ret
You can see the call to constructor and destructor at 00CE1276 and 00CE128C

Find content
Not Telling