c++ - Delete pointer memory and confirm it -


considering following:

tbmodelhframe = new tbmodelheaderframe(this, storage->getdatabase()); 

i guess correct way delete tbmodelhframe memory be

delete tbmodelhframe; 

right?

how check memory released?

yes, allocated new should freed delete. way check if every dinamically allocated memory has been freed use valgrind's memcheck

anyway, safer use smart pointers (see here).


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -