MemoryUsagePointers

class MemoryUsagePointers

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

digraph inheritanceb9e2a818ce { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "MemoryUsagePointers" [URL="acron.core.MemoryUsagePointers.html#acron.core.MemoryUsagePointers",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "MemoryUsagePointers" [arrowsize=0.75,style=""]; }
MemoryUsagePointers.__init__()
MemoryUsagePointers.clear()

Empties the set of pointers.

MemoryUsagePointers.get_age()

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().

MemoryUsagePointers.get_num_pointers()

Returns the number of pointers in the set.

MemoryUsagePointers.get_pointer()

Returns the nth pointer of the set.

MemoryUsagePointers.get_python_pointer()
MemoryUsagePointers.get_type()

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

MemoryUsagePointers.get_type_name()

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

MemoryUsagePointers.get_typed_pointer()

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.

MemoryUsagePointers.output()