mmm because key_close_handle doesn't set the refcount to 0, because the parent also has a reference to it, key_destroy will not get called until the rootkey get's closed, so basically until the wineserver process finishes key_destroy will not get called and the application hive will not get saved.