A
Aaron
Hi,
I've implemented an elegant way to provide a plug-in, hierarchical,
architecture to our application with sub-application isolation -
AppDomains. These AppDomains are loaded and unloaded as neccessary
within the application. Both synchronous and asynchronous events that
cross AppDomain boundaries (and even machine bouindaries) are used
extensively throughout also. These events are often propogated from
child applications up the application hierarchy to the root
application eg: Log messages.
Recently, I noticed the handle count of the application to climb
steadily when AppDomains were instantiated, usually ~20/AppDomain. The
handle count does not drop when AppDomains are unloaded. My initial
thought was garbage collection. However, even explicit calls to
Collect() haven't halted this behaviour.
I call BeginInvoke when firing an event asynchronously without
providing a Async callback. Could this the evil in our code? I've
looked through the documentation and I can't find anything to indicate
that EndInvoke is neccessary. My concern about providing such a
callback is that if a child application fires an event and the
AppDomain in which the child existed is then unloaded then undesirable
behaviour may occur.
I've checked my code to ensure no resources are left open before the
unloading of a domain. Is there a known leak associated with the use
of AppDomains?
Help!
Aaron.
I've implemented an elegant way to provide a plug-in, hierarchical,
architecture to our application with sub-application isolation -
AppDomains. These AppDomains are loaded and unloaded as neccessary
within the application. Both synchronous and asynchronous events that
cross AppDomain boundaries (and even machine bouindaries) are used
extensively throughout also. These events are often propogated from
child applications up the application hierarchy to the root
application eg: Log messages.
Recently, I noticed the handle count of the application to climb
steadily when AppDomains were instantiated, usually ~20/AppDomain. The
handle count does not drop when AppDomains are unloaded. My initial
thought was garbage collection. However, even explicit calls to
Collect() haven't halted this behaviour.
I call BeginInvoke when firing an event asynchronously without
providing a Async callback. Could this the evil in our code? I've
looked through the documentation and I can't find anything to indicate
that EndInvoke is neccessary. My concern about providing such a
callback is that if a child application fires an event and the
AppDomain in which the child existed is then unloaded then undesirable
behaviour may occur.
I've checked my code to ensure no resources are left open before the
unloading of a domain. Is there a known leak associated with the use
of AppDomains?
Help!
Aaron.