Dispose question [message #826056] |
Wed, 21 March 2012 15:47 |
|
Hi,
When the JVM terminates, are all operating system handles (font, images) automatically released, even when there is no explicit dispose? Or are the non-disposed operating system handles in use until the next OS restart?
Regards,
Wim
[Updated on: Wed, 21 March 2012 15:47] Report message to a moderator
|
|
|
|
Re: Dispose question [message #826788 is a reply to message #826223] |
Thu, 22 March 2012 14:03 |
|
Hello Catalin,
Thanks! I had the feeling that closing the process would also reclaim all resources but was never able to find the written rule.
Quote:The operating system frees all of a program's resources when the program exits. Why not just rely on this? Operating system resources are not infinite. If your program doesn't free up resources as they are no longer needed, it can run out of resources. It can also cause other programs to run out of resources. So waiting until the program exits to free up resources is generally a bad idea. Leak tools exist to help detect resource leaks. You can use the Sleak tool to look for leaks in your SWT application.
from: http://www.eclipse.org/articles/swt-design-2/swt-design-2.html
|
|
|
Powered by
FUDForum. Page generated in 0.02003 seconds