Is there any drawback to an assembly loading itself using reflection?
-
I have a case where an assembly dynamically loads another assembly based on what it needs to get done. In some cases, it loads itself (or a copy of itself - not sure) to attend to the task at hand. Is this a problem from any standpoint? Performance hit? Over utilizing memory, bad practice, etc? Thanks, Andrew
-
I have a case where an assembly dynamically loads another assembly based on what it needs to get done. In some cases, it loads itself (or a copy of itself - not sure) to attend to the task at hand. Is this a problem from any standpoint? Performance hit? Over utilizing memory, bad practice, etc? Thanks, Andrew
Only one copy of the code is loaded, whether you do it normally or by reflection. There's no ill-effects to the rest of the system if you do it through reflection. Though, calling methods and instantiating objects through reflection is a bit slower.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Only one copy of the code is loaded, whether you do it normally or by reflection. There's no ill-effects to the rest of the system if you do it through reflection. Though, calling methods and instantiating objects through reflection is a bit slower.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Thanks!