From: Brian G. <br...@qu...> - 2003-07-16 17:46:49
|
> Aren't you defeating your own argument here? If people like you don't care, > they won't pay by calling close() and GC will take care of it just as you > want it. No, but with all the myriad proposals floating around, I'm not surprised that this is all confusing. My positions: - NO finalizer on Context. - No _required_ close/free/destroy/cleanup method on Context -- 99% of what Context does can be handled by GC. - I am not opposed to a subscription-based mechanism for context tools, where they can register a listener, and have an optional method for "signal all the listeners now." But we don't entirely need this -- I'm find with letting tools clean themselves via finalizers or the like. You're right, for frameworks, it doesn't matter at all. But I'm thinking about the trivial WM case, and minimizing the complexity of the basic pattern. I don't like the idea of having a method called "close" but telling people "well, you don't have to use that if don't want to." > If you happen to use CTs that require cleanup then you should call > close(), but as you have stated this is a tiny minority of CTs, and > as such is unlikely to be called. Maybe naming, but not 'close'. How about 'callDestructorsForContextToolsThatCantWipeThemselves', or something like that :) |