This is a list of pointers returned by a
MemoryUsageobject 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
MemoryUsageobject. It doesn’t even exist when compiled with NDEBUG.
Empties the set of pointers.
double get_age(std::size_t n) const¶
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
std::size_t get_num_pointers(void) const¶
Returns the number of pointers in the set.
PyObject *get_python_pointer(std::size_t n) const¶
TypeHandle get_type(std::size_t n) const¶
Returns the actual type of the nth pointer, if it is known.
std::string get_type_name(std::size_t n) const¶
Returns the type name of the nth pointer, if it is known.
TypedObject *get_typed_pointer(std::size_t n) const¶
void output(std::ostream &out) const¶