Yes, you can delete your information pointer as soon as you provide it with glTexImage2D, it will simply copy it somewhere closer to the map (for example, in the memory of the graphics card) and will use it from there.
int *p = getImagePixels(); glTexImage2D(GL_TEXTURE..., p); delete [] p;
source share