# MemoryUsagePointers

from pandac.PandaModules import MemoryUsagePointers

HAVE_PYTHON
Class : MemoryUsagePointers
Description : 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:

MemoryUsagePointers:

## Methods of MemoryUsagePointers:

MemoryUsagePointers (Constructor)
clear
getAge
getNumPointers
getPointer
getPythonPointer
getType
getTypedPointer
getTypeName
output

MemoryUsagePointers MemoryUsagePointers::MemoryUsagePointers(void); HAVE_PYTHON Description:

clear void MemoryUsagePointers::clear(void); Description: Empties the set of pointers.

getAge double MemoryUsagePointers::get_age(int n) const; Description: 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 int MemoryUsagePointers::get_num_pointers(void) const; Description: Returns the number of pointers in the set.

getPointer ReferenceCount *MemoryUsagePointers::get_pointer(int n) const; Description: Returns the nth pointer of the set.

getPythonPointer PyObject *MemoryUsagePointers::get_python_pointer(int n) const; Description: Returns the nth object, represented as a Python object of the appropriate type. Reference counting will be properly set on the Python object. get_typed_pointer() is almost as good as this, but (a) it does not set the reference count, and (b) it does not work for objects that do not inherit from TypedObject. This will work for any object whose type is known, which has a Python representation.

getType TypeHandle MemoryUsagePointers::get_type(int n) const; Description: Returns the actual type of the nth pointer, if it is known.

getTypedPointer TypedObject *MemoryUsagePointers::get_typed_pointer(int n) const; Description: 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 NULL.

getTypeName string MemoryUsagePointers::get_type_name(int n) const; Description: Returns the type name of the nth pointer, if it is known.

output void MemoryUsagePointers::output(ostream &out) const; Description: