Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-dev] SWT Resources should dispose itself to avoid native handle leaks

Hi all,

In a huge RCP product I recently did a SWT leak anylsis with SLeak on Windows and I found a lot of not properly disposed resources. I'm doing this leak analysis on a regular basis and despite code-reviews, trainings, etc. I find new resource leaks every time.

I think that many Java developers are so used to the comfort of garbage collection, that they easily forget about the special care they have to take with SWT resources. And why shouldn't SWT also rely on the garbage collection and make lifes of thousands of developers easier?

In bug 561782 I propose a solution for SWT resources to dipose themself. Before continuing this work I want to hear your general opinion on that. And I need some Linux and Mac experts, that can tell me whether the same problem exists there as well. From the source it looks like GTK and Cocoa have the same issue as the Font class also has a handle on these OS.

Best regards
Conrad Groth

Back to the top