Menu

#2 Ports are not closed on exit.

open
win32 (1)
9
2004-10-29
2004-10-29
No

It turns out that a Python objects __del__ does not
necessarily get called when a program exits. This means
the ports does not get closed unless you specifically
call close on the objects. This is major bug for a
Python program, where the garbage collection is
supposed to make sure you never have to deallocate
resources.

The solution to this is supposed to be to write the
whole python object in C, instead of just wrapping the
c methods in a python object.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.