Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / March 2008

Tip: Looking for answers? Try searching our database.

DLLs and Embedded Resources

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reuben - 09 Mar 2008 04:26 GMT
Hi,
I was designing an application which is intended to run in the background,
and I was wondering about how I should load my resources to reduce the memory
footprint. I was thinking of keeping all the embedded resources in a DLL, so
that they only get loaded when needed.
So my question is this: if your application references a library, does the
library get loaded into memory at startup, or only when its used? There
really isn't much point in keeping the resources seperate otherwise, since it
complicates the code slightly.
Thanks for your help.
Family Tree Mike - 09 Mar 2008 17:08 GMT
> Hi,
> I was designing an application which is intended to run in the background,
[quoted text clipped - 6 lines]
> complicates the code slightly.
> Thanks for your help.

I presume you are talking about some stream resources, as string and other
such resources are pretty minimal.  If you are worried about the memory
footprint, I wouldn't use the dll to embeded resources.  If you feel a need
to embed the resource, then my preference is always to embed it in the dll
that needs it.  If you need the resource in multiple dlls, then I would
strongly consider installing to the disk.
Reuben - 10 Mar 2008 00:40 GMT
Sorry if I caused some confusion, but I was asking if the entire DLL is
loaded into memory when the exe is loaded. The exe appears to load its entire
contents, and I was hoping to reduce the footprint by storing images, etc. in
a DLL, which would hopefully only be loaded into memory when needed.
Family Tree Mike - 10 Mar 2008 03:11 GMT
> Sorry if I caused some confusion, but I was asking if the entire DLL is
> loaded into memory when the exe is loaded. The exe appears to load its entire
> contents, and I was hoping to reduce the footprint by storing images, etc. in
> a DLL, which would hopefully only be loaded into memory when needed.

DLL's are loaded as needed, or, if explicitly loaded by
Assembly.LoadFromFile().  Unloading a dll when you are finished is not as
easy, from what I have heard.  If this is an issue, you may want to ask
others about that.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.