Poprawiony błąd delete [] planes na delete planes ...