Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
GeneralProcessDialogKey and AppDomain Pin
zilch15-Mar-04 9:37
zilch15-Mar-04 9:37 
GeneralRe: ProcessDialogKey and AppDomain Pin
Heath Stewart15-Mar-04 9:55
protectorHeath Stewart15-Mar-04 9:55 
GeneralRe: ProcessDialogKey and AppDomain Pin
Nemanja Trifunovic15-Mar-04 10:23
Nemanja Trifunovic15-Mar-04 10:23 
GeneralRe: ProcessDialogKey and AppDomain Pin
Heath Stewart15-Mar-04 10:50
protectorHeath Stewart15-Mar-04 10:50 
GeneralRe: ProcessDialogKey and AppDomain Pin
zilch15-Mar-04 10:34
zilch15-Mar-04 10:34 
GeneralRe: ProcessDialogKey and AppDomain Pin
Heath Stewart15-Mar-04 10:48
protectorHeath Stewart15-Mar-04 10:48 
GeneralRe: ProcessDialogKey and AppDomain Pin
zilch15-Mar-04 11:12
zilch15-Mar-04 11:12 
GeneralRe: ProcessDialogKey and AppDomain Pin
Heath Stewart15-Mar-04 11:27
protectorHeath Stewart15-Mar-04 11:27 
zilch wrote:
but the .dll file will still take up memory unless you unload the domain, doesn't it?

Yes, but not very much depending on the size of the assembly (and how much IL has been JIT'd). On modern machines, this is very moot unless you plan on having 100s of plugins or something. Our flagship enterprise app uses dozens of rich plugins and - while everything is disposed properly - doesn't use much memory (as far as managed applications go). The majority of memory is used for instances of your classes, not the assembly or the JIT'd native instructions that are cached. If you ship several plugins for your application, consider grouping these classes together. The .NET Framework Class Library (FCL) doesn't have one class per assembly, does it? Having to unload the assemblies once the plugins that contain it is not necessary except in rare cases when memory is a problem (like on Windows CE platforms).

So you're saying the plugins are not getting ProcessDialogKey called in the forms that the plugins create? Are these modal or modeless dialogs? Are these dialogs created in separate threads? The forms are actually classes in the plugin assembly (loaded into a different AppDomain)? I'm just trying to understand what exactly is doing what.

Seriously, though, consider dropping separate AppDomains. Communicating within the same AppDomain is so much easier if you need your plugins to talk to either other or to the main application. The assemblies for plugins aren't loaded until the Type that needs to be loaded and executed (from that assembly) is needed anyway. Depending on how your application loads plugins (like ours works like the COM registry to enumerate plugins from the .config file but doesn't create them until they're needed), many of them might not get loaded anyway.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: ProcessDialogKey and AppDomain Pin
zilch15-Mar-04 12:43
zilch15-Mar-04 12:43 
GeneralRe: ProcessDialogKey and AppDomain Pin
zilch15-Mar-04 13:09
zilch15-Mar-04 13:09 
QuestionRe: ProcessDialogKey and AppDomain Pin
gratajik31-Jan-11 13:38
gratajik31-Jan-11 13:38 
GeneralTask Bar Pin
SherKar15-Mar-04 7:40
SherKar15-Mar-04 7:40 
GeneralRe: Task Bar Pin
Judah Gabriel Himango15-Mar-04 9:12
sponsorJudah Gabriel Himango15-Mar-04 9:12 
GeneralRe: Task Bar Pin
Stefan Troschuetz15-Mar-04 9:51
Stefan Troschuetz15-Mar-04 9:51 
GeneralRe: Task Bar Pin
Heath Stewart15-Mar-04 10:01
protectorHeath Stewart15-Mar-04 10:01 
Generalregd dataset Pin
karteek15-Mar-04 6:46
karteek15-Mar-04 6:46 
GeneralRe: regd dataset Pin
Heath Stewart15-Mar-04 6:56
protectorHeath Stewart15-Mar-04 6:56 
Generalcached dll's Pin
cmarmr15-Mar-04 6:04
cmarmr15-Mar-04 6:04 
GeneralRe: cached dll's Pin
Heath Stewart15-Mar-04 6:20
protectorHeath Stewart15-Mar-04 6:20 
GeneralRe: cached dll's Pin
Heath Stewart15-Mar-04 6:22
protectorHeath Stewart15-Mar-04 6:22 
GeneralRe: cached dll's Pin
cmarmr15-Mar-04 7:08
cmarmr15-Mar-04 7:08 
GeneralRe: cached dll's Pin
Heath Stewart15-Mar-04 7:15
protectorHeath Stewart15-Mar-04 7:15 
GeneralRe: cached dll's Pin
cmarmr15-Mar-04 8:34
cmarmr15-Mar-04 8:34 
GeneralRe: cached dll's Pin
Heath Stewart15-Mar-04 11:34
protectorHeath Stewart15-Mar-04 11:34 
GeneralRe: cached dll's Pin
cmarmr15-Mar-04 15:16
cmarmr15-Mar-04 15:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.