Hi !
Have the any python object with an overrideable destructor ?
exampl.
class fileobj:
def __init(self,filename,access):
self.__file=file(filename,access)
def writelog(self,log):
self.__file.writelines(log)
def close(self)
if self.__file==None: return(0)
self.__file.close()
self.__file=None
like this:
def __done__(self):
self.close()
What the python do with onclosed connections/files ?
ftp=FTP()
ftp.connect(....)
f=file(filename,access)
f.read(....)
The reference is out, ok. But it must run an destructor to the object must close self owned resources. If it is destroyed without destructor - all of the resources are remaining in the background !
This is what I don't understand it dotnet too...
Thx:
KK