hi im using QT4.5 , Debian

Im having some doubts in QT memory management.

for ex:
Qt Code:
  1. class childClass
  2. {
  3. public :
  4. QString strval;
  5. int ival;
  6. childClass();
  7. QLabel *lblstr;
  8. };
  9.  
  10.  
  11. childClass::childClass()
  12. {
  13. ival=5;
  14. strval="test data";
  15. lblstr=new QLabel(this);
  16. lblstr->setText("label name");
  17. }
To copy to clipboard, switch view to plain text mode 

im creating a object from another class named, mainClass

Qt Code:
  1. mainClass::createChild()
  2. {
  3. childClass *c=new childClass;
  4. delete c;
  5. qDebug<<c->ival;
  6. qDebug<<c->strval;
  7. }
To copy to clipboard, switch view to plain text mode 

Even after the delete command, qDebug able to print the ival,strval of childClass.
How to clear the variables ival,strval to free the memory?


Thnks
Bala