deleting an object
Karl Kobata
karl.kobata at syncira.com
Thu Sep 25 21:03:31 EDT 2008
More information about the Python-list mailing list
Thu Sep 25 21:03:31 EDT 2008
- Previous message (by thread): Module import path when embedding python in C
- Next message (by thread): deleting an object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Please help. Questions based on snippet of code below.
1) when myTestCase is deleted, is just the pointer deleted or the
entire instance with all of its data and data structure deleted?
2) What is the practice for deleted the object and recovering the
memory it occupies?
3) If delete is the way, what happens to 'testUtils.utilFunction1()'
if it were instantiated in other classes that have not been deleted yet?
Thanks for your help.
Example:
import testUtils
class testClass:
def __init__(self):
self.testList = list()
self.testDict1 = dict()
self.utils1 = testUtils.utilFunction1()
...
...in the main code body.
myTestCase = testClass()
....
delete myTestCase
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080925/b2e9abe1/attachment.html>
- Previous message (by thread): Module import path when embedding python in C
- Next message (by thread): deleting an object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list