Memory leak (kind of) in ERXObjectStoreCoordinatorSynchronizer

Troy Evans <[email protected]>
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <CADZ67G1z6=afe+fH33LLpByXpftsgC3QCHqeptaau4WnTEanBA@mail.gmail.com>
Hello,

I posted this question on stackoverflow.com a few months ago:
http://stackoverflow.com/questions/10302982/.  I've since found a little
more information about the problem and updated the original question. The
quick version is this:

I've found that ERXObjectStoreCoordinatorSynchronizer seems to synchronize
some things that it shouldn't and fails to clean up some things that fall
out of scope. In the example I have in the stackoverflow question, an
object is created, saved, and then it's EC and OSC are disposed and
everything falls out of scope, which results in the object being removed
from the EODatabase._snapshots array (as it should). After the snapshot is
removed from the EODatabase instance, the synchronizer runs and adds the
(now obsolete) EO to the other OSCs, which results in the object being
*re*-added
to the EODatabase._snapshots array, where it remains until all relevant
OSCs are disposed.

In the app I'm working on, since some OSCs stick around for the life of the
app, the above scenario results in a memory leak with the old/obsolete
objects hanging around in memory until the app is restarted.

I suppose I could periodically locate an dispose all of my OSCs to get
around the issue, but shouldn't it be the synchronizer's job to clean up
obsolete objects?

Is anyone else seeing this behavior?  Is this a bug in
ERXObjectStoreCoordinatorSynchronizer, or am I just doing things
incorrectly?

Thanks,
Troy

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712

_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.