From 2acc9332f1ee091ad6127bb2d58ec4f8ced83fe5 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Mon, 28 Jul 2008 21:00:17 +0000 Subject: [PATCH] show deeptypes of garbage items --- direct/src/showbase/GarbageReport.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/direct/src/showbase/GarbageReport.py b/direct/src/showbase/GarbageReport.py index 499012b5da..05a7101fdc 100755 --- a/direct/src/showbase/GarbageReport.py +++ b/direct/src/showbase/GarbageReport.py @@ -181,6 +181,18 @@ class GarbageReport(Job): objStr = '%s%s' % (objStr[:(maxLen-len(snip))], snip) s.append(format % (idx, itype(self.garbage[idx]), objStr)) + # also log the types of the objects + s.append('===== Garbage Item Types %s=====' % abbrev) + for i in xrange(numGarbage): + yield None + idx = garbageIndices[i] + objStr = deeptype(self.garbage[idx]) + maxLen = 5000 + if len(objStr) > maxLen: + snip = '' + objStr = '%s%s' % (objStr[:(maxLen-len(snip))], snip) + s.append(format % (idx, itype(self.garbage[idx]), objStr)) + if self._args.findCycles: s.append('===== Garbage Cycles =====') for i in xrange(len(self.cycles)):