Created
May 7, 2014 16:34
-
-
Save selevit/12680b41164054cbfe29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#!-*- coding: utf-8 -*- | |
import time | |
import sys | |
class TestObject: | |
def __del__(self): | |
print "Destructor occured..." | |
if __name__ == "__main__": | |
objects = [] | |
counter = 0 | |
while True: | |
if counter >= 5: | |
sys.exit() | |
ob = TestObject() | |
objects.append(ob) | |
counter += 1 | |
time.sleep(1) | |
while True: | |
time.sleep(1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment