Hello,
It would appear that FObjectReferenceCache will only clean up replicated subobjects on the client. Say for example UCharacterMovementComponent::ClientAdjustPosition is executed on the server with a NewBase pointed at a non-replicated primitive component of a replicated actor. In that scenario the primitive component object reference will get quantized/serialized and the client will resolve it no problem since it’s network stable. However, once the server tells the client to destroy the actor associated with that primitive component the actor and it’s replicated subobjects will all be cleared from the ObjectReferenceCache while the primitive component will remain associated with previous net ref handle. Can I get verification that this is indeed the behavior as of 5.6 and if so is it intentional?
Edit:
FObjectReferenceCache::ResolveObjectReferenceHandleInternal -
After looking at this further, maybe the idea is that because FCachedNetObjectReference holds a weak pointer to the underlying object that means that even if it’s in the map we can still clean up properly since the weak pointer’s underlying object will have been destroyed?
Thanks,
Nick
[Attachment Removed]