J
Johnny R
Hello,
I'm loading a Class from Assemly DLL using Activator.CreateInstance.
That loaded Class is executed in a worker Thread with no loop.
What actually happends when class is loaded using Activator.CreateInstance?
If I create same class using Activator.CreateInstance many times will
there be multiple instances of that same class created by
Activator.CreateInstance?
If Activator.CreateInstance will create multiple classes when will those
instances of class be deleted? Do I have to use certain API to delete them
or will they be garbage collected after they are coming out of scope?
Code like below:
{ // Start of Block, scope begings
object baseObject = Activator.CreateInstance (type);
..
..
} // End of Block, scope ends
....
Will Class created above deleted here when it comes out of scope?
Second question is that if I want that object created by
Activator.CreateInstance
is in memory permanently how will I do it? Is it possible to get reference
to
same instance using certain API?
If anyone can give any answers or links to documents containing info I will
appraise it.
Cheers,
I'm loading a Class from Assemly DLL using Activator.CreateInstance.
That loaded Class is executed in a worker Thread with no loop.
What actually happends when class is loaded using Activator.CreateInstance?
If I create same class using Activator.CreateInstance many times will
there be multiple instances of that same class created by
Activator.CreateInstance?
If Activator.CreateInstance will create multiple classes when will those
instances of class be deleted? Do I have to use certain API to delete them
or will they be garbage collected after they are coming out of scope?
Code like below:
{ // Start of Block, scope begings
object baseObject = Activator.CreateInstance (type);
..
..
} // End of Block, scope ends
....
Will Class created above deleted here when it comes out of scope?
Second question is that if I want that object created by
Activator.CreateInstance
is in memory permanently how will I do it? Is it possible to get reference
to
same instance using certain API?
If anyone can give any answers or links to documents containing info I will
appraise it.
Cheers,