A reference in DocumentFragment to RadDocument (CopySource property) can cause a memory after copy-paste between RadDocument.
Workaround:
public static bool ReleaseClipboardExReferences(
RadDocument document)
{
dynamic clipboardEx = new DynamicProxyObject(typeof(ClipboardEx));
if (clipboardEx.documentClipboardData?.CopySource is DynamicProxyObject copySource
&& object.ReferenceEquals(copySource.Instance, document))
{
clipboardEx.documentClipboardData = null;
return true;
}
if (clipboardEx.CopiedDocumentFragment?.Fragment?.CopySource is DynamicProxyObject fragmentCopySource
&& object.ReferenceEquals(fragmentCopySource.Instance, document))
{
clipboardEx.CopiedDocumentFragment = null;
return true;
}
return false;
}