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

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.