deleting an object

Karl Kobata karl.kobata at
Fri Sep 26 03:03:31 CEST 2008

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.





import testUtils


class testClass:

            def __init__(self):

                        self.testList = list()

                        self.testDict1 = dict()

                        self.utils1 = testUtils.utilFunction1()



                 the main code body.

            myTestCase = testClass()


            delete myTestCase


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list