Timo wrote:
Emile van Sebille schreef:
Timo wrote:

<snip>

# Results file
import shelve

def read_result(person):
   results = []

   s = shelve.open(RESULTFILE)
   try:
       results = s[person]


Maybe passing this out prevents s from being garbage collected?
What do you mean by passing out?

You're returning (passing out) results to the caller, which holds (perhaps) a reference to s...


I also tried gc.collect(), but no difference.

... which may be preventing garbage collection.

Emile

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to