What to clear when closing an OpenGL windows?

I should delete Texture objects with glDeleteTexture(), what else should someone clear when closing a window? pointers?

display lists,

rendering context
device context

all other memory allocated

For performance you should be using a private DC (CS_OWNDC in the window class) - you don’t need to release these, and in fact calling ReleaseDC on one will fail harmlessly.

I thought texture objects and dlists are automatically cleaned up when their RC is deleted, but I wouldn’t swear to it.

They supposedly are, but it is always good practive to release memory you allocated just in case the platform you are running one doesn’t do that job too well for you.