[PATCH V2] localrepo: cache types for filtered repos (issue5043)

Jun Wu quark at fb.com
Mon Jul 3 12:12:08 EDT 2017


Excerpts from Yuya Nishihara's message of 2017-07-04 01:01:18 +0900:
> IIUC, dynamically-created classes aren't deleted (or the deletion is
> delayed until GC run) because they are referenced by another class. So
> they would have longer lifetime than the repo instance.

It's not deleted because klass.__mro__ references klass so it's a reference
cycle. There are other cycles but one __mro__ is enough. That applies to all
classes regardless where they get created.

> If that isn't the case, I think per-instance cache is okay.


More information about the Mercurial-devel mailing list