mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-08 23:23:23 -06:00
baseclass: Privatize refcount debug helper
This commit is contained in:
parent
6f4167a66f
commit
b15e51e73b
@ -97,10 +97,10 @@ class vmmGObject(GObject.GObject):
|
||||
if msg:
|
||||
msg += " "
|
||||
logging.debug("%s(%s %s)\n:%s",
|
||||
msg, self.object_key, self.refcount(),
|
||||
msg, self.object_key, self._refcount(),
|
||||
"".join(traceback.format_stack()))
|
||||
|
||||
def refcount(self):
|
||||
def _refcount(self):
|
||||
# Function generates 2 temporary refs, so adjust total accordingly
|
||||
return (sys.getrefcount(self) - 2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user