public async Task ClearContentReference(AbsoluteId referencerId, AssetId contentId, IGraphNode contentNode, NodeIndex index)
        {
            gameDispatcher.EnsureAccess();
            using (await loader.LockDatabaseAsynchronously())
            {
                if (!references.ContainsKey(referencerId))
                {
                    throw new InvalidOperationException("The given referencer is not registered.");
                }

                var referencer = references[referencerId];
                if (!referencer.ContainsKey(contentId))
                {
                    throw new InvalidOperationException("The given content is not registered to the given referencer.");
                }

                var accessors    = referencer[contentId];
                var accessor     = new ReferenceAccessor(contentNode, index);
                var accesorIndex = accessors.IndexOf(accessor);
                if (accesorIndex < 0)
                {
                    throw new InvalidOperationException("The given reference is not registered for the given content and referencer.");
                }

                accessors.RemoveAt(accesorIndex);
                if (accessors.Count == 0)
                {
                    referencer.Remove(contentId);
                    // Unload the content if nothing else is referencing it anymore
                    var unloadContent = references.Values.SelectMany(x => x.Keys).All(x => x != contentId);
                    if (unloadContent)
                    {
                        await loader.UnloadAsset(contentId);

                        contents.Remove(contentId);
                    }
                }
            }
        }