This project has moved and is read-only. For the latest updates, please go here.

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

Mar 27, 2014 at 11: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 11: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 12:20 PM
Edited Mar 27, 2014 at 12:22 PM
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