View Single Post
Posts: 19 | Thanked: 7 times | Joined on Jan 2010
#9
Originally Posted by saxen View Post
Code:
void function()
{
  QObject* obj =  new QObject;
  obj->doSomething()
}
This is called a memory leak
And my advice: if you ask yourself if heap or stack should be used, the stack is mostly the better solution.