Jun 17, 2011 at 10:42 AM
Edited Jun 17, 2011 at 1:37 PM
Thanks for your quick answer, that's indeed the issue. When replacing with IEventAggregator, I don't get the issue.
I guess I'd need to better understand how IEventAggregator is setup.
EDIT : It takes time for the garbage collector to be called. Usually I still receive a few messages in the LeadingControl View, and then it stops. However when using webservices in the viewmodel, I now get other issues.
Errors like :
- "Cannot access a disposed object. Object name: 'System.ServiceModel.Channels.HttpChannelFactory+HttpRequestChannel'."
OR "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."
(while each time I call a service, I close it right after).
So it seems the garbage collection interacts in some way with my service calls, making them fall, and I'm still trying to figure out how to make several modules talk to each other in a decoupled way, with viewmodels subscribing to messages and calling
webservices to get data whenever required.