Message5159

Author zyasoft
Recipients ssteiner, zyasoft
Date 2009-09-14.15:47:32
SpamBayes Score 3.5650057e-05
Marked as misclassified No
Message-id <1252943252.51.0.690291859903.issue1468@psf.upfronthosting.co.za>
In-reply-to
Content
Can you please provide more context why this is a bug for Jython?

Implementations of languages providing garbage collection without ref 
counting do not provide immediate destruction upon a ref going out of 
scope. This can exhaust resources that are linked to objects, such as 
file resource, or leave them hanging until one or more phases of GC has 
run.

Instead it's necessary to ensure that the resource is closed as soon as 
possible. We recommend you use something like the following:

f = open(...)
try:
    do_something_with_it(f)
finally:
    f.close()

or alternatively

with open(...) as f:
    do_something_with_it(f)
History
Date User Action Args
2009-09-14 15:47:32zyasoftsetmessageid: <1252943252.51.0.690291859903.issue1468@psf.upfronthosting.co.za>
2009-09-14 15:47:32zyasoftsetrecipients: + zyasoft, ssteiner
2009-09-14 15:47:32zyasoftlinkissue1468 messages
2009-09-14 15:47:32zyasoftcreate