Would your application be crippled by dropping those references, as below, before releasing the lock? Better, write a lock-protected get_value() function that returns the value, and no references to persistent instances. If I remember correctly, your database is cycle-free, so the gc garbage collector probably isn't doing anything for you, or causing trouble. If it were, you could call gc.disable(). On Sep 21, 2006, at 2:43 PM, Jesus Cea wrote: > def example(s,key) : > global_lock.adquire() > conn.abort() # Be sure your data is fresh > root=conn.get_root() > data=root["data"] > value=data[key] # Retrieve the data > conn.commit() root = None data = None > global_lock.release() > s.send(value) # Can take a lot of time > return