Name: [3253] gasto
Member: 105 months
Authored: 41 videos
Description: C/C++ and python programmer. Some knowledge of graphic design too. Interested in Game Artificial Intelligence and Artificial Life. Currently studying(by myself)too many things to be worth the mention. Happy to contribute to the 'help-without-compensation-asked' community. I hope every one that r ...

Garbage Collection in Python - Part I - [ID:1431] (3/4)

in series: Python from zero.

video tutorial by gasto, added 05/09

(Showmedo is undergoing major changes. To report any problems viewing the videos please email us and include browser and OS specifics. Cheers - Kyran.)

We view an animated illustration of how the garbage collector collects objects under Python 3.0 . That is, two referrers are created by being associated to the Foo class instance, and the Foo class instance itself its created when at least one referrer is left, destroyed when no referrers to it are left. the weakref being associated to the Foo instance, at the end of the animation, is not accounted for the reference count (as seen in the refcount counter at the top-right side of the animation). I type in the class Foo that we will be using in further videos, to explain garbage collection.

Note : the class created here is not intended for any practical purpose. It is just of use for the exercise on learning the concepts behind garbage collection in Python.

class Foo(object):
  def __init__(self):
    self.attribute = None
  def __del__(self):
  def store_attribute(self,obj):
    self.attribute = obj
  def output_attribute(self):

Got any questions?

Get answers in the ShowMeDo Learners Google Group.

Video statistics:

  • Video's rank shown in the most popular listing
  • Video plays: 27 (since July 30th)
  • Plays in last week: 0
  • Published: 87 months ago

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?

You may also want to see our ShowMeDo Google Group to speak to our active users and authors.

Your email address will not be published.

Show some quick comments >>

All comments excluding tick-boxed quick-comments

It's gud for me..

It will not work on Python 2.x only on Python 3.0 because some Python 3.0 exclusive syntax is used.

12. BH Cosmetics Pro Artist Brush Belt Thu, 03 Jun 2010 20:09

Didn't work on python 2.6.5

11. Stephesl Mon, 24 May 2010 23:13

Kind of sucked. The musical introduction was longer than the instruction.

There´s a download button for slow internet connection users.

8. real mac makeup Include Hot Sale XhjWBQWvtk Wed, 27 Jan 2010 05:18

Nice video for beginners !

7. anonymous Sat, 02 Jan 2010 11:55

what is going on with video 3 of this series?!?! So painful! I have a slow connection and could only endure the buffering of the first 40 seconds. Is there any actual instruction after that point?

6. anonymous Fri, 18 Sep 2009 11:24

To the point, nice

A nice starter...

The video is not more advanced, it is simply less practical and more into the core.

I thought it was necessary, because beginners tend to get confused about what an actual variable is in Python. And knowing it is extremely important from the beginning.

The animation is not winning any prizes. But hopefully will help you understand the concept of garbage collection. It runs two times, the first time without the weak reference. The second time with the weak reference.

3. anonymous Sat, 06 Jun 2009 23:57

Going from your 2nd tutorial to your 3rd.... this one requires WAY more programming knowlege already.

Also the intro animation is way too long. It's charmingly bad, but why play it twice?

You are right, I should clarify at least in the description that the Python class is not meant to do anything useful. It was created just for education/experimentation purposes.

Thank you, I'm still working out how to use Python and am very much a beginner, not really sure what the program was meant to be doing

Showmedo is a peer-produced video-tutorials and screencasts site for free and open-source software (FOSS)- with the exception of some club videos, the large majority are free to watch and download.

how to help » about » faq »

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education and documentation are relatively neglected in the Open-source world. Coders love to code, and explaining how best to use or improve the software tends to be deferred or even sidelined.

At Showmedo we believe the community can play a vital role here and also say thanks for the tools and software that make our lives easier. If you have a piece of software you love or a programming langugage you are enthusiastic about, why not make a screencast showing others how to use it? All the stuff you wish you'd been told, the tips, tricks, insights that would have saved you time and frustration.

Screencasting is easier than you think, and we're happy to help you. You can emailus for advice or just use some of the how-to screencasts on the site. This screencasting learning-pathis a good place to start.

Kudos and Thanks for gasto

The basics of Javascript.

Thank you very much for the video

Bold Womens Adidas Big Tongue High Tops Luminous Upgrade Second Generation National Flag Shoes Classical
70 months ago
Python, sweet as candy.

insightful:keep it up

Balenciaga Loafers For Women On Sale Black Leather 2016 11 8.5
72 months ago


Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.