Gennady,
SetBand() uses VSICalloc()/VSIRealloc() for the papoBand array of pointers, not for the band objects themselves. So use of delete to destroy the bands is appropriate. I think you will find that the papoBands is freed with VSIFree() or CPLFree().