Search code examples
windowspywin32winapi

win32: destroy a deskstop created with CreateDesktop


What's the opposite of CreateDesktop()? CloseDesktop() seems to only close the handle to the new desktop, but not to delete it.


Solution

  • IIRC, desktops are reference counted, so they're destroyed when nothing is using them anymore (and having an un-closed handle to one is included as "using").