Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Use weak references to manage system resources?

Hi all,

I'm working on a control that will do a lot of custom painting, and I'm trying to come up with a strategy for managing system resources such as fonts and colors that may be shared by multiple, unrelated classes. From this article, I understand that the recommended practice is to use a reference counting scheme:

http://www.eclipse.org/articles/swt-design-2/swt-design-2.html

It seems like weak references might work well here - any thoughts? I searched for previous discussions on this topic but didn't find anything - any insight would be very much appreciated.

Thanks,
Greg




Back to the top