MemoryUsagePointers

from panda3d.core import MemoryUsagePointers
class MemoryUsagePointers

Bases: DTOOL_SUPER_BASE

This is a list of pointers returned by a MemoryUsage object in response to some query.

Warning: once pointers are stored in a MemoryUsagePointers object, they are reference-counted, and will not be freed until the MemoryUsagePointers object is freed (or clear() is called on the object). However, they may not even be freed then; pointers may leak once they have been added to this structure. This is because we don’t store enough information in this structure to correctly free the pointers that have been added. Since this is intended primarily as a debugging tool, this is not a major issue.

This class is just a user interface to talk about pointers stored in a MemoryUsage object. It doesn’t even exist when compiled with NDEBUG.

Inheritance diagram

Inheritance diagram of MemoryUsagePointers

__init__(*args, **kwargs)
clear()

C++ Interface: clear(const MemoryUsagePointers self)

/**
  • Empties the set of pointers.

*/

getAge()

C++ Interface: get_age(MemoryUsagePointers self, int n)

/**
  • Returns the age of the nth pointer: the number of seconds elapsed between

  • the time it was allocated and the time it was added to this set via a call

  • to MemoryUsage::get_pointers().

*/

getNumPointers()

C++ Interface: get_num_pointers(MemoryUsagePointers self)

/**
  • Returns the number of pointers in the set.

*/

getPointer()

C++ Interface: get_pointer(MemoryUsagePointers self, int n)

/**
  • Returns the nth pointer of the set.

*/

getPointers()
getPythonPointer()

C++ Interface: get_python_pointer(MemoryUsagePointers self, int n)

getType()

C++ Interface: get_type(MemoryUsagePointers self, int n)

/**
  • Returns the actual type of the nth pointer, if it is known.

*/

getTypeName()

C++ Interface: get_type_name(MemoryUsagePointers self, int n)

/**
  • Returns the type name of the nth pointer, if it is known.

*/

getTypedPointer()

C++ Interface: get_typed_pointer(MemoryUsagePointers self, int n)

/**
  • Returns the nth pointer of the set, typecast to a TypedObject if possible.

  • If the pointer is not a TypedObject or if the cast cannot be made, returns

  • nullptr.

*/

getTypedPointers()
get_age()

C++ Interface: get_age(MemoryUsagePointers self, int n)

/**
  • Returns the age of the nth pointer: the number of seconds elapsed between

  • the time it was allocated and the time it was added to this set via a call

  • to MemoryUsage::get_pointers().

*/

get_num_pointers()

C++ Interface: get_num_pointers(MemoryUsagePointers self)

/**
  • Returns the number of pointers in the set.

*/

get_pointer()

C++ Interface: get_pointer(MemoryUsagePointers self, int n)

/**
  • Returns the nth pointer of the set.

*/

get_pointers()
get_python_pointer()

C++ Interface: get_python_pointer(MemoryUsagePointers self, int n)

get_type()

C++ Interface: get_type(MemoryUsagePointers self, int n)

/**
  • Returns the actual type of the nth pointer, if it is known.

*/

get_type_name()

C++ Interface: get_type_name(MemoryUsagePointers self, int n)

/**
  • Returns the type name of the nth pointer, if it is known.

*/

get_typed_pointer()

C++ Interface: get_typed_pointer(MemoryUsagePointers self, int n)

/**
  • Returns the nth pointer of the set, typecast to a TypedObject if possible.

  • If the pointer is not a TypedObject or if the cast cannot be made, returns

  • nullptr.

*/

get_typed_pointers()
output()

C++ Interface: output(MemoryUsagePointers self, ostream out)

/**

*/