예제 #1
0
	def testBorrowed(self):
		self.assertEquals(memprof.getCounter(), 0)
		c = memprof.ConsumptionUnit()
		d = c.meAgain()
		del d
		del c
		self.assertEquals(memprof.getCounter(), 0)
예제 #2
0
	def testNotKeepAlive(self):
		self.assertEquals(memprof.getCounter(), 0)
		c = memprof.ConsumptionUnit()
		d = c.notMe()
		self.assertEquals(memprof.getCounter(), 2)
		del c
		self.assertEquals(memprof.getCounter(), 1)
		del d
		self.assertEquals(memprof.getCounter(), 0)