Unfortunately, this example has a potential resource leak.
不幸的是,这个例子存在潜在的资源泄漏。
Can "using" with more than one resource cause a resource leak?
可以使用“与一个以上的资源,导致资源泄漏?”
If neither class closes the stream, the result will be a file resource leak. (See Figure 3.)
如果有类关闭了流,那么结果将会是文件资源的泄露(参见图3)。
Figure 1 shows an example of an EMF model created for the DB2 trace file elements that you need to search for a resource leak.
图1显示了为DB 2跟踪文件元素创建的emf模型的一个示例,它可以帮助发现资源泄漏。
A database resource leak occurs when an application allocates a resource but then never declares the resource to be no longer used (for example, by issuing a close operation).
当应用程序分配了资源,但此后未声明不再使用资源时(比如通过发起close操作)便会出现数据库资源泄漏。
If you determine that the JDBC connection was not handled properly and the owning application "forgot" to close it, you have discovered a resource leak that needs to be fixed.
如果确定JDBC连接未处理处理,并且所属应用程序“忘记”关闭它,则表示您发现了一处需要修复的资源泄漏。
First, WPF can leak application-level resources for styles and templates if the control that references the resource never actually USES it. Jossef Goldberg elaborates.
首先,如果引用了资源的控件从未使用过该资源的话,那么WPF就会导致应用级的样式与模板内存泄漏问题。
Once the leak was fixed, I wanted to make sure the problem wasn't reintroduced in later code changes, so I built a unit test to help prevent this. It's a resource usage unit test, shown in Listing 1.
下面是一个例子:在邮件应用程序中发现一个内存泄漏,当该泄漏被处理后,我希望确定在以后的代码改变中不会再发生该问题,于是为此构建了一个单元测试。
Pipeline leak detection location system is a typical device for pipeline maintenance, which can efficiently reduce the resource waste and the environment pollution caused by pipeline leak.
管道泄漏检测定位系统是目前管道泄漏检测中的一种典型装置,能有效控制管道泄漏引起的资源浪费和环境污染。
Pipeline leak can lead up to resource loss and environment pollution. It is necessary to resolve those problems as soon as possible.
长输管道在运行中的泄漏既造成资源的损失,也污染了环境,是一个急需解决的问题。
Pipeline leak can lead up to resource loss and environment pollution. It is necessary to resolve those problems as soon as possible.
长输管道在运行中的泄漏既造成资源的损失,也污染了环境,是一个急需解决的问题。
应用推荐