GL object destruction

When an OpenGL context is lost when the host program ends or the context is disposed of by the host program, what becomes of the OpenGL objects held by that context (display lists, textures, etc)?

I suppose they must be properly disposed of, but after glancing at the specification, I’m left wondering. Is it the programmer’s responsibility to delete these objects, or will the graphics drivers do this automatically?

whenever in doubt, it is always much safer to do it on your own.(disclaimer: i am rather new at this so don’t blame me if anything goes wrong)