Commit eb4706e9 authored by Levin Zimmermann's avatar Levin Zimmermann

bt5/erp5_wendelin/DataBucketStream/getBucketByX: Free memory after loading

After loading the data from the ZODB, the 'getBucketBy...' methods
now free unused memory. Before this patch, it was the responsibility
of the user to deactivate no longer needed buckets, now this happens
automatically.
parent 9a516871
Pipeline #34579 running with stage
in 0 seconds
......@@ -199,7 +199,10 @@ class DataBucketStream(Document):
"""
Get one bucket
"""
return self._tree[key].value
persistent_string = self._tree[key]
v = persistent_string.value
persistent_string._p_deactivate() # free memory
return v
def getBucketByIndex(self, index=None):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment