[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: [CDO 1.0] weak references and adapters

Tom,

I see it as one of the hidden but main advantages of CDO that the EObjects can be silently discarded from memory when it runs low and automatically recreated when they are needed again. And you're right, I didn't think about existing adapters. Can you please open an enhancement request and make a proposal on how exactly you'd like to have it configurable?

Cheers
/Eike


Tom Crockett schrieb:
I've been fighting a very insidious bug for the last 3 days in which adapters I attached to my shared model were mysteriously disappearing. I couldn't find any place where they were getting removed, so I was really mystified for a long time. Today I finally figured out that it was because of the fact that CDOViewImpl stores its objects in a weak ReferenceValueMap, so they were getting GC'ed, along with their adapters! I worked around this fairly easily by attaching an EContentAdapter when first loading a resource which recursively maintains strong references to every object in the view, but I just wanted to mention this for anyone who may be experiencing such problems. Also, I wanted to ask whether this behavior might be made configurable, if it already hasn't, for CDO 2.0.