CrossAppDomainSerializer
From: Matt Davey (matt.davey_at_finetix.com)
Date: 03/12/04
- Next message: Matt Davey: "Re: Loading MSCORSVR for a Windows Services."
- Previous message: Valery Pryamikov: "Re: Dispose must be thread-safe ?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 12 Mar 2004 15:28:18 -0000
For certain reasons which I won't go into we are running an application in a
AppDomain we create, and not in the default AppDomain. It appears from
SciTech's .NET Memory Profiler that when we use reflection to retrieve a
property value (string or double type) off an object, we incurring an
AppDomain marshal:
CrossAppDomainSerializer.SerializeObject(object)
AppDomain.Serialize(object)
AppDomain.MarshalObject(object)
RuntimeMethodIngo.InternalInvoke(object, BindingFlags, Binder, object[],
CultureInfo, bool)
RuntimeMethodIngo.Invoke(object, BindingFlags, Binder, object[],
CultureInfo)
MethodBase.Invoke(object, object[])
RuntimePropertyInfo.GetValue(object, object[])
If we run the same code in the default AppDomain, no AppDomain marshal
occurs (as expected). There is no code in any other AppDomain apart from
the AppDomain we created. The only unusual thing about this application is
that the strings are allocated (Marshal::PtrToStringAnsi) by Visual C++
(assembly built with /clr:initialAppDomain).
Anyone got an ideas what is going on?
- Next message: Matt Davey: "Re: Loading MSCORSVR for a Windows Services."
- Previous message: Valery Pryamikov: "Re: Dispose must be thread-safe ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|