direct.showbase.GarbageReport¶
from direct.showbase.GarbageReport import FakeDelObject, FakeObject, GarbageLogger, GarbageReport, b_checkForGarbageLeaks, checkForGarbageLeaks
Contains utility classes for debugging memory leaks.
Inheritance diagram
digraph inheritance94efc77b7d { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DirectObject" [URL="direct.showbase.DirectObject.html#direct.showbase.DirectObject.DirectObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="This is the class that all Direct/SAL classes should inherit from"]; "FakeDelObject" [URL="direct.showbase.GarbageReport.html#direct.showbase.GarbageReport.FakeDelObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "FakeObject" [URL="direct.showbase.GarbageReport.html#direct.showbase.GarbageReport.FakeObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "GarbageLogger" [URL="direct.showbase.GarbageReport.html#direct.showbase.GarbageReport.GarbageLogger",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="If you just want to log the current garbage to the log file, make"]; "GarbageReport" -> "GarbageLogger" [arrowsize=0.75,style=""]; "GarbageReport" [URL="direct.showbase.GarbageReport.html#direct.showbase.GarbageReport.GarbageReport",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="Detects leaked Python objects (via gc.collect()) and reports on garbage"]; "Job" -> "GarbageReport" [arrowsize=0.75,style=""]; "Job" [URL="direct.showbase.Job.html#direct.showbase.Job.Job",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="Base class for cpu-intensive or non-time-critical operations that"]; "DirectObject" -> "Job" [arrowsize=0.75,style=""]; }- class GarbageLogger(name, *args, **kArgs)[source]¶
Bases:
GarbageReportIf you just want to log the current garbage to the log file, make one of these. It automatically destroys itself after logging
- class GarbageReport(name: str, log: bool = True, verbose: bool = False, fullReport: bool = False, findCycles: bool = True, threaded: bool = False, doneCallback: Callable[[GarbageReport], object] | None = None, autoDestroy: bool = False, priority: int | None = None, safeMode: bool = False, delOnly: bool = False, collect: bool = True)[source]¶
Bases:
JobDetects leaked Python objects (via gc.collect()) and reports on garbage items, garbage-to-garbage references, and garbage cycles. If you just want to dump the report to the log, use GarbageLogger.
- notify = <direct.directnotify.Notifier.Notifier object>¶