when should I explicitely close a file?

D

Dennis Lee Bieber

However, a Python implementation that always returned 0 for
sys.getrefcount would technically satisfy the word of the documentation,
if not the spirit.

Seems like a count of 1 would be more useful -- after all, there
would be the reference used to pass the object into sys.getrefcount()
itself <G>
 
L

Lawrence D'Oliveiro

Adam said:

Because a) it uses extra memory needlessly, and b) waiting until an object
has dropped out of cache before touching it again just slows things down.
There are much better ways to do memory management / garbage
collection; especially when dealing with large applications.

Especially with large applications, the above considerations apply even more
so.

If you don’t agree, you might as well stick to Java.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top