473,499 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assemply and using Activator.CreateInstance

Hello All,

If I load an Assembly (.DLL file) from Process (.Exe file)
using Activator.CreateInstance() method are there or should
I remove Assemply (.DLL) from memory after using it with
Activator's method other method?

I would like to know that are there any possibilities that Assembly
will
remain in memory after process (.exe) is exited.

Have anyone of you any ideas about this?

Cheers!

Jun 21 '06 #1
3 1912
Unloading assemblies from an AppDomain is a pain and not (IIRC)
recommended; any specific reason you want to do it? The other thing to
try is loading it in a separate AppDomain that you can trash
afterwards.

Marc

Jun 21 '06 #2
Maybe I misread your intent slightly:
after process (.exe) is exited


Well, if the /process/ ends, then everything loaded in that process
ends; it is, however, possible for a process to outlive the Main()
method if you fire up a non-background thread: the process lives as
long as there is a non-background thread alive - very useful for
writing server applications where the Main() method just kicks things
off.

Marc

Jun 21 '06 #3
Hi,

"Hulk" <hu*******@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hello All,

If I load an Assembly (.DLL file) from Process (.Exe file)
using Activator.CreateInstance() method are there or should
I remove Assemply (.DLL) from memory after using it with
Activator's method other method?
IIRC you cannot unload an assembly from memory. You would have to create
another appdomain and then unload it. A PITA if you ask me.
I would like to know that are there any possibilities that Assembly
will
remain in memory after process (.exe) is exited.

Have anyone of you any ideas about this?

It will not, it will be unloaded when your appdomain ends.

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jun 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
505
by: shmeian | last post by:
I have the following code which works fine. However I want to pass the object I'm instantiating a string for its constructor. I can't get the syntax right. Can someone give me an example of...
0
8413
by: samlee | last post by:
Hi All, I'm learning how to write C# using reflection, but don't know how to code using reflection this.Controls.Add(this.label1); Could anyone help, Thank in advance. ...
15
12757
by: Brian Rogers | last post by:
Hello everyone, I apologize for the cross and re-post, but I am still searching for an answer. Why can C++ can create this object, but C# can't? I am trying to create an instance of the...
7
12006
by: hazz | last post by:
this is a repost with more concise code (well, for me) and better questions (I hope....) . given the following two classes, my intent is to use either Activator.CreateInstance or InvokeMember pass...
5
1579
by: Abhishek Srivastava | last post by:
Hello All, I want my clients to use my remoted object by means of interfaces. These interfaces also ensure clean seperation between client and server. The approach I know to instantiate a CAO...
6
1341
by: CreateObject | last post by:
Assume that I have the classes below; class mercedes: IAuto { .... } class ford: IAuto{ .... }
1
2824
by: learning | last post by:
Hi how can I instaltiate a class and call its method. the class has non default constructor. all examples i see only with class of defatul constructor. I am trying to pull the unit test out from...
0
1418
by: Jon Skeet [C# MVP] | last post by:
On Apr 11, 8:40 am, Andrew <And...@discussions.microsoft.comwrote: Okay, that means you've either not given the full classname (including namespace) or it's not in mscorlib or the currently...
0
1280
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Found it. string name = Properties.Settings.Default.ClassName.ToString(); //"myproject.myclass, myassembly" format. //name = "ABC.MyClass, Assem" ; Type t = Type.GetType(name); Object obj...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.