1. <legend id='mZN8c'><style id='mZN8c'><dir id='mZN8c'><q id='mZN8c'></q></dir></style></legend>

    <small id='mZN8c'></small><noframes id='mZN8c'>

    1. <i id='mZN8c'><tr id='mZN8c'><dt id='mZN8c'><q id='mZN8c'><span id='mZN8c'><b id='mZN8c'><form id='mZN8c'><ins id='mZN8c'></ins><ul id='mZN8c'></ul><sub id='mZN8c'></sub></form><legend id='mZN8c'></legend><bdo id='mZN8c'><pre id='mZN8c'><center id='mZN8c'></center></pre></bdo></b><th id='mZN8c'></th></span></q></dt></tr></i><div id='mZN8c'><tfoot id='mZN8c'></tfoot><dl id='mZN8c'><fieldset id='mZN8c'></fieldset></dl></div>
      • <bdo id='mZN8c'></bdo><ul id='mZN8c'></ul>
      <tfoot id='mZN8c'></tfoot>

      程序退出时是否释放了泄漏的内存?

      Is leaked memory freed up when the program exits?(程序退出时是否释放了泄漏的内存?)

      • <bdo id='y74bS'></bdo><ul id='y74bS'></ul>
          • <tfoot id='y74bS'></tfoot>
            • <legend id='y74bS'><style id='y74bS'><dir id='y74bS'><q id='y74bS'></q></dir></style></legend>

              1. <i id='y74bS'><tr id='y74bS'><dt id='y74bS'><q id='y74bS'><span id='y74bS'><b id='y74bS'><form id='y74bS'><ins id='y74bS'></ins><ul id='y74bS'></ul><sub id='y74bS'></sub></form><legend id='y74bS'></legend><bdo id='y74bS'><pre id='y74bS'><center id='y74bS'></center></pre></bdo></b><th id='y74bS'></th></span></q></dt></tr></i><div id='y74bS'><tfoot id='y74bS'></tfoot><dl id='y74bS'><fieldset id='y74bS'></fieldset></dl></div>
                  <tbody id='y74bS'></tbody>

                <small id='y74bS'></small><noframes id='y74bS'>

                本文介绍了程序退出时是否释放了泄漏的内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                如果我在不知情的情况下编写了内存泄漏,然后应用程序终止,泄漏的内存是否被释放?

                If I programmed — without knowing it — a memory leak, and the application terminates, is the leaked memory freed?

                推荐答案

                是的,内存泄漏"只是进程不再引用的内存,因此无法再释放.操作系统仍会跟踪分配给进程的所有内存,并在该进程终止时将其释放.

                Yes, a "memory leak" is simply memory that a process no longer has a reference to, and thus can no longer free. The OS still keeps track of all the memory allocated to a process, and will free it when that process terminates.

                在绝大多数情况下,操作系统会释放内存 - 就像 Windows、Linux、Solaris 等正常风格"的情况一样.但重要的是要注意,在各种实时环境等特殊环境中操作系统程序终止时可能不会释放内存.

                In the vast majority of cases the OS will free the memory - as is the case with normal "flavors" of Windows, Linux, Solaris, etc. However it is important to note that in specialized environments such as various Real-Time Operating Systems the memory may not be freed when the program is terminated.

                这篇关于程序退出时是否释放了泄漏的内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Constructor initialization Vs assignment(构造函数初始化 Vs 赋值)
                Is a `=default` move constructor equivalent to a member-wise move constructor?(`=default` 移动构造函数是否等同于成员移动构造函数?)
                Has the new C++11 member initialization feature at declaration made initialization lists obsolete?(声明时新的 C++11 成员初始化功能是否使初始化列表过时了?)
                Order of constructor call in virtual inheritance(虚继承中构造函数调用的顺序)
                How to use sfinae for selecting constructors?(如何使用 sfinae 选择构造函数?)
                Initializing a union with a non-trivial constructor(使用非平凡的构造函数初始化联合)

                <legend id='EBzHY'><style id='EBzHY'><dir id='EBzHY'><q id='EBzHY'></q></dir></style></legend>
                  <bdo id='EBzHY'></bdo><ul id='EBzHY'></ul>
                  • <i id='EBzHY'><tr id='EBzHY'><dt id='EBzHY'><q id='EBzHY'><span id='EBzHY'><b id='EBzHY'><form id='EBzHY'><ins id='EBzHY'></ins><ul id='EBzHY'></ul><sub id='EBzHY'></sub></form><legend id='EBzHY'></legend><bdo id='EBzHY'><pre id='EBzHY'><center id='EBzHY'></center></pre></bdo></b><th id='EBzHY'></th></span></q></dt></tr></i><div id='EBzHY'><tfoot id='EBzHY'></tfoot><dl id='EBzHY'><fieldset id='EBzHY'></fieldset></dl></div>

                  • <tfoot id='EBzHY'></tfoot>

                          <tbody id='EBzHY'></tbody>

                        <small id='EBzHY'></small><noframes id='EBzHY'>