Difference between revisions of "FAQ Why do I have to dispose of colors, fonts, and images?"

From Eclipsepedia

Jump to: navigation, search
 
(See Also:)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
This question was asked so often that the SWT team wrote an article
+
This question was asked so often that the SWT team wrote an article to explain why. The Eclipse online article [http://www.eclipse.org/articles/swt-design-2/swt-design-2.html “Managing Operating System Resources”, by Carolyn McLeod and Steve Northover] describes SWT’s philosophy on resource management and defends its reasons for not relying on the Java garbage collector for disposing of unused resources. The philosophy, in short, is this: If you create it, you dispose of it. The capsule summary of the reasoning is that the specification for Java finalization is too weak to reliably support management of operating system resources. This is also why database connections, sockets, file handles, and other heavyweight resources are not handled by the Java garbage collector.  If you are still not convinced, read the article.
to explain why.
+
The Eclipse online article “Managing Operating System Resources”,
+
by Carolyn McLeod and Steve Northover, can be found in the articles
+
section at eclipse.org.  The article describes SWT’s philosophy
+
on resource management and defends its reasons for not relying
+
on the Java garbage collector for disposing of unused resources.
+
The philosophy, in short, is this: If you create it, you dispose of it.
+
The capsule summary of the reasoning is that the specification for Java
+
finalization is too weak to reliably support management of operating system
+
resources. This is also why database connections,
+
sockets, file handles, and other heavyweight resources are not
+
handled by the Java garbage collector.  If you are still not convinced,
+
read the article.
+
 
+
 
+
 
+
 
+
 
+
  
 
== See Also: ==
 
== See Also: ==
 +
*[[FAQ_How_do_I_use_image_and_font_registries%3F]]
  
 
+
{{Template:FAQ_Tagline}}
[[FAQ_How_do_I_use_image_and_font_registries%3F]]
+
 
+
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
+

Latest revision as of 13:58, 30 May 2013

This question was asked so often that the SWT team wrote an article to explain why. The Eclipse online article “Managing Operating System Resources”, by Carolyn McLeod and Steve Northover describes SWT’s philosophy on resource management and defends its reasons for not relying on the Java garbage collector for disposing of unused resources. The philosophy, in short, is this: If you create it, you dispose of it. The capsule summary of the reasoning is that the specification for Java finalization is too weak to reliably support management of operating system resources. This is also why database connections, sockets, file handles, and other heavyweight resources are not handled by the Java garbage collector. If you are still not convinced, read the article.

[edit] See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.