Skip to content

Instantly share code, notes, and snippets.

@selevit
Created May 7, 2014 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selevit/12680b41164054cbfe29 to your computer and use it in GitHub Desktop.
Save selevit/12680b41164054cbfe29 to your computer and use it in GitHub Desktop.
#!/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