PC Review


Reply
Thread Tools Rate Thread

DLLs and Embedded Resources

 
 
Reuben
Guest
Posts: n/a
 
      9th Mar 2008
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.
 
Reply With Quote
 
 
 
 
Family Tree Mike
Guest
Posts: n/a
 
      9th Mar 2008


"Reuben" wrote:

> 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.


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.


 
Reply With Quote
 
Reuben
Guest
Posts: n/a
 
      9th Mar 2008
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.
 
Reply With Quote
 
Family Tree Mike
Guest
Posts: n/a
 
      10th Mar 2008


"Reuben" wrote:

> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2002 - 2003, and embedded DLLs =?Utf-8?B?RGVubmlz?= Microsoft Access 1 20th Apr 2006 07:56 PM
Need a tool to browse .Net DLLs (resources, etc) Andrew Backer Microsoft Dot NET 2 3rd Jun 2005 06:41 PM
Combining resources DLLs Paul E Collins Microsoft C# .NET 1 8th Nov 2004 09:11 AM
programatically compiling resources into dlls =?Utf-8?B?U2lhdnJhag==?= Microsoft Dot NET Framework 0 23rd Apr 2004 07:41 AM
Localisation by updating exe only (not the resources.dlls) Daniel Moth Microsoft Dot NET Compact Framework 1 11th Mar 2004 05:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:41 PM.