In WeakAction class, what is the different between ActionReference and Reference

Mar 27, 2014 at 10:11 AM

I'm confusing that why ActionReference and Reference existed both in WeakAction ? They don't reference the same object?

Sorry maybe this is a stupid question, but from the definition of WeakReference, i really didn't understand the different between ActionReference and Reference

Mar 27, 2014 at 10:36 AM

Most of the time it is the same object. But there is a possibility that a user defines a Reference for lifetime management of the recipient, and that the method is defined in another object, or that it is static.

Mar 27, 2014 at 11:20 AM
Edited Mar 27, 2014 at 11:22 AM
Hi Laurent

I looked up the Messengers.cs. in where the constructor WeakAction(object target, Action<T> action) is used.
Here target is a recipient, it is not a target of action.


Thanks a lot