M
Marc Bartsch
Hi,
I use a delegate to call a method from my main GUI thread. This delegate
takes one of my business objects as a parameter. When I do a synchronous
call, it all works fine, but if I do an async call like:
delegate.BeginInvoke( myBusinessObject, callBackDelegate, delegate );
and I debug into the called method, I find that myBusinessObject is
partially corrupt. All basic type members, like strings etc. are fine, but
my reference members to other objects from the original thread are
non-existent anymore and the debugger cannot resolve them. When I check the
object on the caller's side, i.e. right after the BeginInvoke call, it is
fine, too.
I checked the MSDN, but they always use plain old datatypes as examples.
Maybe it only works for them?
If anyone could enlighten me, why my objects are corrupt, I would be very,
very grateful.
Thanks,
Marc.
I use a delegate to call a method from my main GUI thread. This delegate
takes one of my business objects as a parameter. When I do a synchronous
call, it all works fine, but if I do an async call like:
delegate.BeginInvoke( myBusinessObject, callBackDelegate, delegate );
and I debug into the called method, I find that myBusinessObject is
partially corrupt. All basic type members, like strings etc. are fine, but
my reference members to other objects from the original thread are
non-existent anymore and the debugger cannot resolve them. When I check the
object on the caller's side, i.e. right after the BeginInvoke call, it is
fine, too.
I checked the MSDN, but they always use plain old datatypes as examples.
Maybe it only works for them?
If anyone could enlighten me, why my objects are corrupt, I would be very,
very grateful.
Thanks,
Marc.