C++ destructor: when the memory gets freed? -


if delete object causes destructor called, memory freed before or after destructor has finished doing whatever there in function?

memory freed once least derived class subobject has been destroyed. if have:

class base { };  class derived : public base { public:     ~derived(); }; 

then first derived destroyed, base destroyed , memory deallocated.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -