项目是否多次加载DLL? [英] Does project load DLL multiple times?

查看:74
本文介绍了项目是否多次加载DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我的UI应用程序使用三个DLL并且其中两个DLL引用了一些名为utilities.dll的
,UI应用程序是否会加载两次有效的实用程序,或者是否需要

编译器识别正在发生的事情并加载utilities.dll只需

一次?


谢谢,

Brett

If my UI app uses three DLLs and two of those DLLs reference something
named utilities.dll, does the UI app load utilities.dll twice or does
the compiler recognize what is going on and load utilities.dll just
once?

Thanks,
Brett

推荐答案

我认为这是Windows级别的事情。 DLL只加载一次。


" Brett Romero" <交流***** @ cygen.com>在消息中写道

news:11 ********************** @ z14g2000cwz.googlegr oups.com ...
I think this is a Windows-level thing. DLLs are loaded only once.

"Brett Romero" <ac*****@cygen.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
如果我的UI应用程序使用三个DLL并且其中两个DLL引用了名为utilities.dll的内容,那么UI应用程序是否会加载utilities.dll两次,或者编译器是否识别正在发生的事情加载utilities.dll只是
一次?

谢谢,
Brett
If my UI app uses three DLLs and two of those DLLs reference something
named utilities.dll, does the UI app load utilities.dll twice or does
the compiler recognize what is going on and load utilities.dll just
once?

Thanks,
Brett



另外,如果实用程序。 dll正在使用Forms命名空间,因为它有使用表单的
类,在中间的teir中是否有任何内存浪费

DLL如果它们没有加载表单?换句话说,如果我在Forms命名空间中引用

但从不创建表单,那么Forms命名空间

是否还在使用内存?


如果在这个场景中Forms命名空间使用了内存,那么它是否足够

值得注意?只是寻找这个工作原理的细节。


谢谢,

Brett

Also, if utilities.dll is using the Forms namespace because it has
classes that use forms, is there any waste of memory in the middle teir
DLLs if they are not loading forms? In other words, if I reference
the Forms namespace but never create a form, does the Forms namespace
still use memory?

If memory is used by the Forms namespace in this scenario, is it enough
to be noticeable? Just looking for details of how this works.

Thanks,
Brett


Brett,


请参阅内联:
Brett,

See inline:
如果我的UI应用程序使用三个DLL,其中两个DLL引用了一些名为的实用程序.dll,UI应用程序是否加载utilities.dll两次,或者编译器是否识别出正在发生的事情并且只是
一次加载utilities.dll?
If my UI app uses three DLLs and two of those DLLs reference something
named utilities.dll, does the UI app load utilities.dll twice or does
the compiler recognize what is going on and load utilities.dll just
once?




该应用程序将为其使用的每个应用程序域加载utilities.dll。

对于大多数程序,只有一个应用程序域,它将被加载

适用于该应用领域。但是,在ASP.NET中,您可以拥有多个应用程序

域,并在该过程中多次加载DLL。


希望这会有所帮助。 />
-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


这篇关于项目是否多次加载DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆