|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
anyway to unload the dllHi,
I'm using vb.net vs2005 to development an mobile device application. I need to call a dll in the program but i discovery that the resource of the dll is not free after using it. Is there any way to free the dll? Thanks! How did you discovered that the resources are not free after usage ??
Not that after unloading objects the memory footprint will not be inmediatly smaller , the framework will reserve the memory for future usage , unless the system is running low on resources the memory will not be given back to the system regards Michel Posseth [MCP] Show quoteHide quote "Amy" <A**@discussions.microsoft.com> schreef in bericht news:57B4C69A-F8CF-4435-B634-F3DCB92F1CFC@microsoft.com... > Hi, > > I'm using vb.net vs2005 to development an mobile device application. I > need > to call a dll in the program but i discovery that the resource of the dll > is > not free after using it. Is there any way to free the dll? > > Thanks! Michel Posseth [MCP] wrote:
> How did you discovered that the resources are not free after usage ?? Presumably because the DLL file on disk is locked. We have the same issue here, the application must be closed before the lock is released. This is only a problem in WinForms based apps, due to the excellent DLL shadowing feature in ASP.NET. I'd like to know if there's a workable solution to this problem too... -- (O)enone Aha , now we are getting somewhere :-)
I asumed we were discussing resources in terms of memory , and now i understand we are talking about IO locks > I'd like to know if there's a workable solution to this problem too... I guess there is , you could dynamicly load and unload your objects i guess this would lock and unlock the file We are thus talking about "Reflection at runtime" a simple example ? : ( i am gonna write this on a comp without dev environment , just out of my plain head so excuse me for anny typo`s :- ) Dim ObjType as Type =Assembly.getexecutingAssembly().Gettype("assemblyname.objectname") Dim Obj as object = Activator.CreateInstance(Type) obj now holds an instance of the class please note that this is a sort of equivalant to "late binding" , so the execution speed will be slower as a direct referenced assembly regards Michel Posseth [MCP] Show quoteHide quote "Oenone" <oen***@nowhere.com> schreef in bericht news:eqzzLRq7GHA.4304@TK2MSFTNGP03.phx.gbl... > Michel Posseth [MCP] wrote: >> How did you discovered that the resources are not free after usage ?? > > Presumably because the DLL file on disk is locked. We have the same issue > here, the application must be closed before the lock is released. This is > only a problem in WinForms based apps, due to the excellent DLL shadowing > feature in ASP.NET. > > I'd like to know if there's a workable solution to this problem too... > > -- > > (O)enone >
Check for .NET Installed
What .NET classes are SLOW vs. API? mp3 synchronised lyrics Programmatically Find All Registry Entries Trouble executing a stored procedure Bitmap to JPEG with compression settings ToolStripMenuItem Possible bug in VS2005 Design View when using an ASP:Panel to show/hide groups of <tr>'s PLEASE HELP! CANT INSTALL .NET Check for .NET Installed |
|||||||||||||||||||||||