[Tutor] Final de-allocation before the application exists

K Dhanvi dhanvik@gmx.net
Tue Jul 22 06:58:01 2003


This is a multi-part message in MIME format.

------=_NextPart_000_00F7_01C3506E.8240DF20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi friends,=20
 =20
  I am developing an module where I allocate certain threads and memory =
in the module and an application would use this allocated resources. I =
would like to know whether Python provides any function which would be =
called at the end of the life cycle of the application or just before =
the application exits. =20
 =20
  I would like to know whether to know since,  I would like to hide this =
function in my module and not force the user to call the function. This =
would remove the dependency on the user to specifically call the =
function. Also if there is such a function , I can make sure that the my =
module resources are de-allocated gracefully.=20

    Please let me know incase this can be possible.

with regards,=20
K Dhanvi
------=_NextPart_000_00F7_01C3506E.8240DF20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY style=3D"COLOR: #000000; FONT-FAMILY: Arial" bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi friends, </FONT></DIV>
<DIV><FONT size=3D2>&nbsp; </FONT></DIV>
<DIV><FONT size=3D2>&nbsp; I am developing an module where I allocate =
certain=20
threads and memory in the module and&nbsp;an application would use this=20
allocated resources.&nbsp;I would like to know whether Python provides =
any=20
function&nbsp;which would be called at the end of the life cycle of the=20
application&nbsp;or just before the application exits.&nbsp; =
</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; </FONT></DIV>
<DIV><FONT size=3D2>&nbsp; I would like to know whether to know =
since,&nbsp;=20
I&nbsp;would&nbsp;like to&nbsp;hide this function in my module and not =
force the=20
user to call the function.&nbsp;This would remove the dependency on the =
user to=20
specifically call the function. Also if there is such a function , I can =
make=20
sure that the my module&nbsp;resources are de-allocated gracefully.=20
</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp; &nbsp; Please let me know incase this can be=20
possible.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3Darial size=3D2>with regards, <BR>K=20
Dhanvi</FONT></DIV></BODY></HTML>

------=_NextPart_000_00F7_01C3506E.8240DF20--