id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 4972,Repository.close() not called / cleanup mechanism,thomas.moschny@…,Christian Boos,"It seems to me that `Repository.close()` is never called, especially not by the main users of the vc layer, i.e. `versioncontrol/web_ui/{changeset.py|log.py|browser.py}`. In my vc backend I'd have to do some cleanup (closing a database connection) when the repository handle is not needed anymore. The `close()` method looks like the right place for doing such cleanups (in contrast to `__del__()` finalizers, which are highly unreliable). Note that such cleanups have to be done ''always'' when trac ends, regardless of the serving method used! (For example, during development, I use tracd, and regularly kill it using a ctrl-c). Thinking of it, trac could even have a shutdown extension point to be implemented by all plugins that need to do something when trac terminates. (Maybe it would be worth filing an enhancement ticket for that...) ",defect,closed,normal,0.11,version control,devel,normal,fixed,,,,,,