@Nullable
    MUCRoom remove(@Nonnull final String roomName)
    {
        //memory leak will happen if we forget remove it from GroupEventDispatcher
        final Lock lock = ROOM_CACHE.getLock(roomName);
        lock.lock();
        try {
            Log.trace("Removing room '{}' of service '{}'", roomName, serviceName);
            final MUCRoom room = ROOM_CACHE.remove(roomName);
            if (room != null) {
                room.getRoomHistory().purge();
                GroupEventDispatcher.removeListener(room);
                UserEventDispatcher.removeListener(room);
                updateNonPersistentRoomStat(room, null);
            }
            localRooms.remove(roomName);
            return room;
        } finally {
            lock.unlock();
        }
    }
Removes a room instance from this manager.

This method will only remove the instance from management (and trigger appropriate event listeners). It will not
remove the room from the database, if it's in there.

@param roomName The name of the room to be removed.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoomManager.java