RamSession leaks RLock objects if session.save() not called
I'm using !RamSessions with my CherryPy app and the most excellent Dowser has revealed to me that I am leaking RLocks. I followed through to the Trace page and it looks like the locks in question are ones stored in the !RamSession.locks dict.
The way I read the !RamSession.clean_up code, the lock will never be unreferenced from this dict unless I have first called save() at least once on the session (to put a key in the !RamSession.cache dict). Since I never call save() on my sessions (what's the point, with a !RamSession?), the locks persist forever.
I can change my code to call save(), which is probably nice in case I ever switch to a persistent session storage, but I thought I would point this behavior out since it could be considered to be a bug.
Reported by email@example.com