Hi; I have a little question about QList and memory usage. On my header I have a QList pointer:

Qt Code:
  1. QList<MyObjectData> *myList;
To copy to clipboard, switch view to plain text mode 

on class an init method

Qt Code:
  1. void MyClass::init(){
  2.  
  3. myList= new QList<MyObjectData>;
  4.  
  5. }
To copy to clipboard, switch view to plain text mode 

periodically I feed my list with new elements :

Qt Code:
  1. void MyClass::feedList(int id){
  2.  
  3. MyObjectData mod;
  4. mod.setId(id);
  5. myList->append(mod);
  6.  
  7. }
To copy to clipboard, switch view to plain text mode 

and method called by a timer take this data, use them and removing by calling removeAt(0) :


Qt Code:
  1. void MyClass::useData(){
  2.  
  3. if(commandRequest->size()>0 && busy == false)
  4. {
  5. busy = true;
  6. executeSomething((MyObjectData )myList->at(0));
  7. myList->removeAt(0);
  8. busy = false;
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 

can be any memory issue whit these methods? thank you...