since the colorbuffer owns the resizer  i would recommend using a smart pointer  i e  std  unique ptr textureresize instead of a naked pointer here  if you do that  you will not need to delete the resizer manually in the destructor 