473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Release DLL from memory

I've loaded a DLL in memory (object.createinstance). How can I unload it from
memory again? When I set the handle to nothing the DLL stays active (that is,
it's internal routines are still executing).
Dec 6 '06 #1
1 1941
You can't unload a DLL from an AppDomain that has used any of the DLLs types.
You have load the DLL and use it's types in a separate DLL then unload the
AppDomain. The usual scenario for doing this is called sandboxing. the .NET
Security blog [1] has lots of detail about doing this.

[1] http://blogs.msdn.com/shawnfa/
--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"JanD" wrote:
I've loaded a DLL in memory (object.createinstance). How can I unload it from
memory again? When I set the handle to nothing the DLL stays active (that is,
it's internal routines are still executing).
Dec 9 '06 #2

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

Similar topics

6
by: ss | last post by:
Hi I built an exe in console debug mode & Release mode . The console debug mode -exe works fine ...but the release mode EXE starts well but fails mid way . The exe is being started as a...
0
by: gchandran | last post by:
Hi All, Problem: Call to DOMDocument::getElementsByTagName() in a loop causes growth in memory consumption? Consider the following lines of code which simulates the problem that I am facing....
7
by: Techno Learner | last post by:
Sorry for the lame question but, what's the difference between Debug and Release versions?
3
by: Marc | last post by:
I am using Visual Studio 2003 with .NET Framework 1.x on XP SP2. I am executing the following code (see also http://dturini.blogspot.com/2004/06/on-past-few-days-im-dealing-with-som e.html) ...
1
by: spiff | last post by:
We are migrating from VC++ 6 to VC++ 2003. It is a plain, unmanaged application with both C and C++ source. When running the debug build, even outside the debugger, the memory allocation/deallocation...
10
by: babak | last post by:
Hi everybody I'm working with a project in embedded Visual Studio 4 and I have a general problem which I hope that somebody can help me with. My problem is the following: My project works fine in...
5
by: Rodrigue | last post by:
I have code where I populate a data table using visual basic.net code. I call the clear method on the table but it does not seem to release the memory. When I populate the table again, the memory...
2
by: ABC | last post by:
How should I to release the pop-up page object on memory when I close the page? I have main page, which will open a popup webpage when a button clicked. In the first opened pop-up page, it is...
2
by: Epetruk | last post by:
Hello, I have a problem where an application I am working on throws an OutOfMemoryException when I run it in Release mode, whereas it doesn't do this when I am running in Debug. The...
7
by: Dmitriy V'jukov | last post by:
On Jun 16, 3:09 pm, Anthony Williams <anthony....@gmail.comwrote: Yes, I've already read this. It's just GREAT! It's far more useful and intuitive. And it contains clear and simple binding...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.