hi, for more performance, i am accessing to graph points directly. something like this code:

for(int i=0;i<1024;i++){
  (ui->plot_platform->graph(0)->data()->begin()+Saved_points)->key=x_pos[i];
  (ui->plot_platform->graph(0)->data()->begin()+Saved_points)->value=y_pos[i];
  Saved_points++;
}

this block runs when i receive a 1024-byte packet of data. data should be added to previous data. So i should reserve 1024 sells of memory in first time and 1024 sells in second time(In total: 2048 sells) and ...
how i can reserve memory without deleting previous memory?
thanks