You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MerginProject may not get cleaned up properly #149
When MerginProject is created, it creates geodiff object and assigns an internal logger to geodiff. This creates a cyclic reference (pygeodiff refs MerginProject, and MerginProject refs pygeodiff) that may keep resources held, which may be a problem if MerginProject object is created many times. See also fix for this in db-sync: MerginMaps/db-sync#79
importpygeodiffclassMerginProjectX:
def__init__(self, directory):
def_logger_callback(level, text_bytes):
self.x() # not a real function, but refs this object...self.geodiff=pygeodiff.GeoDiff()
self.geodiff.set_logger_callback(_logger_callback)
# this will keep consuming more and more resourcesforiinrange(50000):
print(i)
mp=MerginProjectX("x")
#mp.geodiff = None # this helps to break ref cycletime.sleep(0.005)
Activity