i am creating a program containing QPushButtons, the Problem is when i am adding QPushButtons memory(RAM) increasing but when i deleted all added buttons memory is not fully releasing.

Qt Code:
  1. void TempTest ::addSLOT()
  2. {
  3. li= new QList<QPushButton*>;
  4. for(int i=0;i<50000;i++)
  5. {
  6. p->setText("sample");
  7. p->setFixedSize(100,100);
  8. li->append(p);
  9. }
  10. }
  11. void TempTest ::removeSLOT()
  12. {
  13. while(li->count())
  14. {
  15. QPushButton*p= li->at(0);
  16. li->removeAt(0);
  17. delete p;
  18. }
  19. delete li;
  20. }
To copy to clipboard, switch view to plain text mode 

1.initialy memory is 2.0 mb

2.after adding memory increased to 49.3 mb

3.after deleting memory decreased to 4.1 mb

there is 2.1 mb of RAM it never released