Why are you deleting it when you've added references to it in several places?
@LB : to avoid memory leak? or am i not supposed to delete it?
You delete it when you are 100% done with that particular memory address. Which probably will be in your destructor.  or if you have some sort of delete/erase function.[/edit]
Last edited on
You don't have a memory leak if you can still reference the data!