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